/** * Leaf */ Node createLeaf(int nodeType) { return new Node(nodeType); }
/** * Debugger */ Node createDebugger(int lineno) { return new Node(Token.DEBUGGER, lineno); }
/** * Throw */ Node createThrow(Node expr, int lineno) { return new Node(Token.THROW, expr, lineno); }
/** * Leaf */ Node createLeaf(int nodeType) { return new Node(nodeType); }
/** * Throw */ Node createThrow(Node expr, int lineno) { return new Node(Token.THROW, expr, lineno); }
Node createVariables(int token, int lineno) { return new Node(token, lineno); }
/** * DOTQUERY */ public Node createDotQuery (Node obj, Node body, int lineno) { setRequiresActivation(); Node result = new Node(Token.DOTQUERY, obj, body, lineno); return result; }
Node createCondExpr(Node cond, Node ifTrue, Node ifFalse) { int condStatus = isAlwaysDefinedBoolean(cond); if (condStatus == ALWAYS_TRUE_BOOLEAN) { return ifTrue; } else if (condStatus == ALWAYS_FALSE_BOOLEAN) { return ifFalse; } return new Node(Token.HOOK, cond, ifTrue, ifFalse); }
Node createExprStatement(Node expr, int lineno) { int type; if (parser.insideFunction()) { type = Token.EXPR_VOID; } else { type = Token.EXPR_RESULT; } return new Node(type, expr, lineno); }
/** * Regular expressions */ Node createRegExp(int regexpIndex) { Node n = new Node(Token.REGEXP); n.putIntProp(Node.REGEXP_PROP, regexpIndex); return n; }
private Node createCondExpr(Node cond, Node ifTrue, Node ifFalse) { int condStatus = isAlwaysDefinedBoolean(cond); if (condStatus == ALWAYS_TRUE_BOOLEAN) { return ifTrue; } else if (condStatus == ALWAYS_FALSE_BOOLEAN) { return ifFalse; } return new Node(Token.HOOK, cond, ifTrue, ifFalse); }
private Node createCondExpr(Node cond, Node ifTrue, Node ifFalse) { int condStatus = isAlwaysDefinedBoolean(cond); if (condStatus == ALWAYS_TRUE_BOOLEAN) { return ifTrue; } else if (condStatus == ALWAYS_FALSE_BOOLEAN) { return ifFalse; } return new Node(Token.HOOK, cond, ifTrue, ifFalse); }
Node createUseLocal(Node localBlock) { if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug(); Node result = new Node(Token.LOCAL_LOAD); result.putProp(Node.LOCAL_BLOCK_PROP, localBlock); return result; }
private Node createUseLocal(Node localBlock) { if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug(); Node result = new Node(Token.LOCAL_LOAD); result.putProp(Node.LOCAL_BLOCK_PROP, localBlock); return result; }
private Node transformThrow(ThrowStatement node) { decompiler.addToken(Token.THROW); Node value = transform(node.getExpression()); decompiler.addEOL(Token.SEMI); return new Node(Token.THROW, value, node.getLineno()); }
private Node transformExprStmt(ExpressionStatement node) { Node expr = transform(node.getExpression()); decompiler.addEOL(Token.SEMI); return new Node(node.getType(), expr, node.getLineno()); }
private Node transformExprStmt(ExpressionStatement node) { Node expr = transform(node.getExpression()); decompiler.addEOL(Token.SEMI); return new Node(node.getType(), expr, node.getLineno()); }