public void visitLetExpr(LetExpr that) { try { print("LetExpr:"); } catch (Exception e) { } super.visitLetExpr(that); }
public void visitLetExpr(LetExpr tree) { try { print("(let " + tree.defs + " in " + tree.expr + ")"); } catch (IOException e) { throw new UncheckedIOException(e); } }
@Override public Void visitExpressionStatement(ExpressionStatementTree expressionStatementTree, Pair<Tree, RelationTypes> t) { Node expressionStatementNode = createSkeletonNode(expressionStatementTree); attachType(expressionStatementTree, expressionStatementNode); connectWithParent(expressionStatementNode, t.getFirst(), t.getSecond()); if (!(expressionStatementTree.getExpression() instanceof LetExpr)) scan(expressionStatementTree.getExpression(), Pair.create((Tree) expressionStatementTree, RelationTypes.EXPR_ENCLOSES)); return null; }
public Void visitParenthesized(ParenthesizedTree parenthesizedTree, Pair<Tree, RelationTypes> t) { if (parenthesizedTree instanceof LetExpr) return null; Pair<Tree, RelationTypes> n = Pair.create((Tree) parenthesizedTree, RelationTypes.PARENTHESIZED_ENCLOSES); Node parenthesizedNode = createSkeletonNode(parenthesizedTree); attachType(parenthesizedTree, parenthesizedNode); connectWithParent(parenthesizedNode, t.getFirst(), t.getSecond()); scan(parenthesizedTree.getExpression(), n); return null; }
protected void diffLetExpr(LetExpr oldT, LetExpr newT) { // TODO: perhaps better to throw exception here. Should be never // called. }
private boolean matchLetExpr(LetExpr t1, LetExpr t2) { return listsMatch(t1.defs, t2.defs) && treesMatch(t1.expr, t2.expr); }
public LetExpr LetExpr(List<JCVariableDecl> defs, JCTree expr) { return invoke(LetExpr, defs, expr); }
public LetExpr LetExpr(JCVariableDecl def, JCTree expr) { return invoke(LetExprSingle, def, expr); }
public ALetExpr(LetExpr ltree) { super(ltree.defs, ltree.expr); }
public ALetExpr(LetExpr ltree, String lcomment) { this(ltree); setComment(lcomment); }
@Override public void visitLetExpr(LetExpr tree) { printNode(tree); children("defs", tree.defs); child("expr", tree.expr); indent--; }