use of com.sun.source.tree.CaseTree in project j2objc by google.
the class TreeConverter method convertSwitch.
private TreeNode convertSwitch(SwitchTree node, TreePath parent) {
TreePath path = getTreePath(parent, node);
SwitchStatement newNode = new SwitchStatement().setExpression(convertWithoutParens(node.getExpression(), path));
for (CaseTree switchCase : node.getCases()) {
newNode.addStatement((SwitchCase) convert(switchCase, path));
TreePath switchCasePath = getTreePath(path, switchCase);
for (StatementTree s : switchCase.getStatements()) {
newNode.addStatement((Statement) convert(s, switchCasePath));
}
}
return newNode;
}
Aggregations