private static JumpToInlinedFinally createJumpToInlinedFinally(final FunctionNode fn, final List<Block> inlinedFinallies, final Block finallyBlock) { final String labelName = fn.uniqueName(":finally"); final long token = finallyBlock.getToken(); final int finish = finallyBlock.getFinish(); inlinedFinallies.add(new Block(token, finish, new LabelNode(finallyBlock.getFirstStatementLineNumber(), token, finish, labelName, finallyBlock))); return new JumpToInlinedFinally(labelName); }
@Override public boolean enterJumpToInlinedFinally(final JumpToInlinedFinally jumpToInlinedFinally) { addStatement(jumpToInlinedFinally); return false; }
@Override public Node leaveJumpToInlinedFinally(final JumpToInlinedFinally jumpToInlinedFinally) { return leaveJumpNode(jumpToInlinedFinally); }
@Override public boolean enterJumpToInlinedFinally(final JumpToInlinedFinally jumpToInlinedFinally) { return enterJumpStatement(jumpToInlinedFinally); }
@Override public Node leaveJumpToInlinedFinally(final JumpToInlinedFinally jumpToInlinedFinally) { weight += BREAK_WEIGHT; return jumpToInlinedFinally; }
/** * Callback for entering a JumpToInlinedFinally * * @param jumpToInlinedFinally the node * @return true if traversal should continue and node children be traversed, false otherwise */ public boolean enterJumpToInlinedFinally(final JumpToInlinedFinally jumpToInlinedFinally) { return enterDefault(jumpToInlinedFinally); }
/** * Callback for leaving a JumpToInlinedFinally * * @param jumpToInlinedFinally the node * @return processed node, which will replace the original one, or the original node */ public Node leaveJumpToInlinedFinally(final JumpToInlinedFinally jumpToInlinedFinally) { return leaveDefault(jumpToInlinedFinally); }