use of com.github.javaparser.ast.expr.SwitchExpr in project checker-framework by typetools.
the class JointJavacJavaParserVisitor method visitSwitchExpression17.
/**
* Visit a switch expression.
*
* @param javacTree switch expression tree
* @param javaParserNode java parser node
* @return null
*/
public Void visitSwitchExpression17(Tree javacTree, Node javaParserNode) {
SwitchExpr node = castNode(SwitchExpr.class, javaParserNode, javacTree);
processSwitchExpression(javacTree, node);
// Switch expressions are always parenthesized in javac but never in JavaParser.
ExpressionTree expression = ((ParenthesizedTree) TreeUtils.switchExpressionTreeGetExpression(javacTree)).getExpression();
expression.accept(this, node.getSelector());
visitLists(TreeUtils.switchExpressionTreeGetCases(javacTree), node.getEntries());
return null;
}
use of com.github.javaparser.ast.expr.SwitchExpr in project checker-framework by typetools.
the class DoubleJavaParserVisitor method visit.
@Override
public void visit(final SwitchExpr node1, final Node other) {
SwitchExpr node2 = (SwitchExpr) other;
defaultAction(node1, node2);
visitLists(node1.getEntries(), node2.getEntries());
node1.getSelector().accept(this, node2.getSelector());
}
Aggregations