@Override public Void visitUnknown(Element e, Void p) { show("unknown", e); indent(+1); try { super.visitUnknown(e, p); } catch (UnknownElementException ex) { System.err.println("caught " + ex); } indent(-1); return null; }
/** * Visits an unknown element. This method is called if * this visitor is used in a version of the language later * than 1.6, where new elements have been added. This * implementation always throws a {@link UnknownElementException} * but this is not required of subclasses. * * @param element the element to visit. * @param parameter the additional parameter, specific to the visitor. * @return the return value specific to the visitor. * @throws UnknownElementException by default. */ public R visitUnknown(Element element, P parameter) { throw new UnknownElementException(element, parameter); }