@Override public boolean enterSplitNode(final SplitNode splitNode) { splitNode.toString(sb, printTypes); sb.append(EOLN); indent += TABWIDTH; indent(); return true; }
@Override public Node leaveSplitNode(final SplitNode splitNode) { sb.append("</split>"); sb.append(EOLN); indent -= TABWIDTH; indent(); return splitNode; }
/** * Create a new split node from statements contained in a parent block. * * @param parent Parent block. * @param statements Statements to include. * * @return New split node. */ private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) { final long token = parent.getToken(); final int finish = parent.getFinish(); final String name = function.uniqueName(SPLIT_PREFIX.symbolName()); final Block newBlock = new Block(token, finish, statements); return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT)); }
private JumpStatement leaveJumpNode(final JumpStatement jump) { if (inSplitNode()) { final SplitState splitState = getCurrentSplitState(); final SplitNode splitNode = splitState.splitNode; if (lc.isExternalTarget(splitNode, jump.getTarget(lc))) { appendSplitReturn(splitState.getSplitStateIndex(jump), jump.getLineNumber()); return jump; } } appendStatement(jump); return jump; }
@Override public boolean enterSplitNode(final SplitNode splitNode) { splitNode.toString(sb); sb.append(EOLN); indent += TABWIDTH; indent(); return true; }
@Override public boolean enterSplitNode(final SplitNode splitNode) { return false; }
@Override public boolean enterSplitNode(final SplitNode splitNode) { getCurrentFunctionState().splitDepth++; splitStates.push(new SplitState(splitNode)); return true; }
SplitState(final SplitNode splitNode) { this.splitNode = splitNode; }