public Node createSwitchStatement(Node condition, Node body) { return posify(new Switch().rawCondition(condition).rawBody(body)); }
public Node createSwitchStatement(Node condition, Node body) { return posify(new Switch().rawCondition(condition).rawBody(body)); }
public Node createSwitchStatement(Node condition, Node body) { return posify(new Switch().rawCondition(condition).rawBody(body)); }
@Override public void visitSwitchStatement(SwitchStatement node) { lombok.ast.Switch switchStat = new lombok.ast.Switch(); switchStat.astCondition((lombok.ast.Expression) toTree(node.expression)); switchStat.astBody(toBlock(node.statements)); switchStat.astBody().setPosition(toPosition(node.blockStart, node.sourceEnd)); set(node, setPosition(node, switchStat)); }
@Override public void visitSwitchStatement(SwitchStatement node) { lombok.ast.Switch switchStat = new lombok.ast.Switch(); switchStat.astCondition((lombok.ast.Expression) toTree(node.expression)); switchStat.astBody(toBlock(node.statements)); switchStat.astBody().setPosition(toPosition(node.blockStart, node.sourceEnd)); set(node, setPosition(node, switchStat)); }
@Override public void visitSwitchStatement(SwitchStatement node) { lombok.ast.Switch switchStat = new lombok.ast.Switch(); switchStat.astCondition((lombok.ast.Expression) toTree(node.expression)); switchStat.astBody(toBlock(node.statements)); switchStat.astBody().setPosition(toPosition(node.blockStart, node.sourceEnd)); set(node, setPosition(node, switchStat)); }
@Override public void visitSwitch(JCSwitch node) { Switch s = new Switch(); JCExpression cond = node.getExpression(); setConversionPositionInfo(s, "()", getPosition(cond)); s.rawCondition(toTree(removeParens(cond))); Block b = new Block(); s.astBody(b); for (JCCase c : node.getCases()) { JCExpression rawExpr = c.getExpression(); if (rawExpr == null) b.rawContents().addToEnd(setPos(c, new Default())); else b.rawContents().addToEnd(setPos(c, new Case().rawCondition(toTree(rawExpr)))); fillList(c.getStatements(), b.rawContents()); } set(node, s); }
@Override public void visitSwitch(JCSwitch node) { Switch s = new Switch(); JCExpression cond = node.getExpression(); setConversionPositionInfo(s, "()", getPosition(cond)); s.rawCondition(toTree(removeParens(cond))); Block b = new Block(); s.astBody(b); for (JCCase c : node.getCases()) { JCExpression rawExpr = c.getExpression(); if (rawExpr == null) b.rawContents().addToEnd(setPos(c, new Default())); else b.rawContents().addToEnd(setPos(c, new Case().rawCondition(toTree(rawExpr)))); fillList(c.getStatements(), b.rawContents()); } set(node, s); }
@Override public void visitSwitch(JCSwitch node) { Switch s = new Switch(); JCExpression cond = node.getExpression(); setConversionPositionInfo(s, "()", getPosition(cond)); s.rawCondition(toTree(removeParens(cond))); Block b = new Block(); s.astBody(b); for (JCCase c : node.getCases()) { JCExpression rawExpr = c.getExpression(); if (rawExpr == null) b.rawContents().addToEnd(setPos(c, new Default())); else b.rawContents().addToEnd(setPos(c, new Case().rawCondition(toTree(rawExpr)))); fillList(c.getStatements(), b.rawContents()); } set(node, s); }