text: public Collection<ParseTree> evaluate(ParseTree t) {List<ParseTree> nodes = new ArrayList<ParseTree>();for (Tree c : Trees.getChildren(t)) {if ( c instanceof TerminalNode ) {TerminalNode tnode = (TerminalNode)c;if ( (tnode.getSymbol().getType() == tokenType && !invert) ||(tnode.getSymbol().getType() != tokenType && invert) ){nodes.add(tnode);}}}return nodes;}