if (node.hasLinkedFields()) { writer.print("if (symbol != null)").lbrace(); for (int i = 0; i < node.fields.length; i++) { TreeField field = node.fields[i]; TreeFieldLink link = field.link; if (link == null) continue; writer.println("this."+field+" = symbol."+link.getLink()+";"); } writer.rbrace(); }
    private void printExtTreeNode(TreeNode node) {        if (node.symbol == TreeSymbol.NoSym) return;        writer.print("public static class Ext"+node+" extends "+node);        writer.lbrace();        writer.print("private ").print(tree.t_Symbol).println(" symbol;");        writer.println();        node.printParams(writer.print("public Ext"+node.name+"(")).print(")");        writer.lbrace();        node.printArgs(writer.print("super(")).println(");");        writer.rbrace();        writer.println();        writer.print("public boolean hasSymbol()");        writer.lbrace();        writer.println("return true;");        writer.rbrace();        writer.println();        if (node.symbol == TreeSymbol.DefSym) {            writer.print("public boolean definesSymbol()");            writer.lbrace();            writer.println("return true;");            writer.rbrace();            writer.println();        }        writer.print("public ").print(tree.t_Symbol).print(" symbol()");        writer.lbrace();        writer.println("return symbol;");        writer.rbrace();        writer.println();        writer.print("public Tree setSymbol(").print(tree.t_Symbol).print(" symbol)");        writer.lbrace();        writer.println("this.symbol = symbol;");        writer.println("return this;");        writer.rbrace();        writer.println();        writer.rbrace();        writer.println();    }