@Override public String toSource(int depth) { return value == null ? "yield" : "yield " + value.toSource(0); }
@Override public String toSource(int depth) { return value == null ? "yield" : "yield " + value.toSource(0); }
/** * Prints the source indented to depth 0. */ public String toSource() { return this.toSource(0); }
/** * Prints the source indented to depth 0. */ public String toSource() { return this.toSource(0); }
/** * Prints the source indented to depth 0. */ public String toSource() { return this.toSource(0); }
@Override public String toSource(int depth) { StringBuilder sb = new StringBuilder(); sb.append(expr.toSource(depth)); sb.append(";\n"); return sb.toString(); }
@Override public String toSource(int depth) { StringBuilder sb = new StringBuilder(); for (Label label : labels) { sb.append(label.toSource(depth)); // prints newline } sb.append(statement.toSource(depth + 1)); return sb.toString(); }
@Override public String toSource(int depth) { StringBuilder sb = new StringBuilder(); sb.append(makeIndent(depth)); sb.append("{\n"); for (Node kid : this) { sb.append(((AstNode)kid).toSource(depth+1)); } sb.append(makeIndent(depth)); sb.append("}\n"); return sb.toString(); }
@Override public String toSource(int depth) { StringBuilder sb = new StringBuilder(); sb.append(makeIndent(depth)); sb.append("{\n"); for (Node kid : this) { sb.append(((AstNode)kid).toSource(depth+1)); } sb.append(makeIndent(depth)); sb.append("}\n"); return sb.toString(); }
public boolean visit(AstNode node) { int type = node.getType(); if (type == Token.SCRIPT) return true; if (node.getParent() == null) throw new IllegalStateException ("No parent for node: " + node + "\n" + node.toSource(0)); return true; } });
public boolean visit(AstNode node) { int type = node.getType(); if (type == Token.SCRIPT) return true; if (node.getParent() == null) throw new IllegalStateException ("No parent for node: " + node + "\n" + node.toSource(0)); return true; } });