public List<GrammarAST> getAllChildrenWithType(int type) {
		List<GrammarAST> nodes = new ArrayList<GrammarAST>();
		for (int i = 0; children!=null && i < children.size(); i++) {
			Tree t = (Tree) children.get(i);
			if ( t.getType()==type ) {
				nodes.add((GrammarAST)t);
			}
		}
		return nodes;
	}
If we build an ATN, we make AST node point at left edge of ATN construct
tool/src/org/antlr/v4/tool/ast/GrammarAST.java