@Override public Result visitLabeledStatement(LabeledStatementTree node, BreakContext cxt) { cxt.enter(node.getLabel()); try { return node.getStatement().accept(this, cxt); } finally { cxt.exit(node.getLabel()); } }
@Override public Boolean visitLabeledStatement(LabeledStatementTree tree, Void unused) { // break/continue targets have already been resolved by javac, so // there's nothing to do here return scan(tree.getStatement()); }
&& label.equals(((LabeledStatementTree) leaf).getLabel())) { return MatchResult.NO_MATCH;
@Override public Boolean visitLabeledStatement(LabeledStatementTree tree, Void unused) { // break/continue targets have already been resolved by javac, so // there's nothing to do here return scan(tree.getStatement()); }
@Override public String visitLabeledStatement(LabeledStatementTree reference, Void v) { return (reference != null) ? detailedKindString(reference, reference.getLabel()) : ""; }
@Override public ULabeledStatement visitLabeledStatement(LabeledStatementTree tree, Void v) { return ULabeledStatement.create(tree.getLabel(), template(tree.getStatement())); }
public R visitLabeledStatement(LabeledStatementTree node, P p) { return scan(node.getStatement(), p); }
@Override public String visitLabeledStatement(LabeledStatementTree reference, Void v) { return (reference != null) ? detailedKindString(reference, reference.getLabel()) : ""; }
@Override public Choice<State<JCLabeledStatement>> visitLabeledStatement( final LabeledStatementTree node, State<?> state) { return chooseSubtrees( state, s -> unifyStatement(node.getStatement(), s), stmt -> maker().Labelled((Name) node.getLabel(), stmt)); }
@Override public Void visitLabeledStatement(LabeledStatementTree node, Void p) { return visit(node.getStatement(), p); }
/**Find span of the {@link LabeledStatementTree#getLabel()} identifier in the source. * Returns starting and ending offset of the name in the source code that was parsed * (ie. {@link CompilationInfo.getText()}, which may differ from the positions in the source * document if it has been already altered. * * @param lst labeled statement which name should be searched for * @return the span of the name, or null if cannot be found * @since 0.131 */ public int[] findNameSpan(LabeledStatementTree lst) { return findNameSpan(lst.getLabel().toString(), lst); }
@Override public Choice<Unifier> visitLabeledStatement(LabeledStatementTree node, Unifier unifier) { unifier.putBinding(key(), node.getLabel()); return getStatement().unify(node.getStatement(), unifier); } }
@Override public Object visitLabeledStatement(LabeledStatementTree node, Object p) { return scan(node.getStatement(), p); }
@Override public String visitLabeledStatement(LabeledStatementTree reference, Void v) { return (reference != null) ? detailedKindString(reference, reference.getLabel()) : ""; }
@Override public Void visitLabeledStatement(LabeledStatementTree expected, Tree actual) { Optional<LabeledStatementTree> other = checkTypeAndCast(expected, actual); if (!other.isPresent()) { addTypeMismatch(expected, actual); return null; } checkForDiff(expected.getLabel().contentEquals(other.get().getLabel()), "Expected statement label to be <%s> but was <%s>.", expected.getLabel(), other.get().getLabel()); scan(expected.getStatement(), other.get().getStatement()); return null; }
@Override public JCTree visitLabeledStatement(LabeledStatementTree node, Void p) { return node.getStatement().accept(this, p); } }
@Override public Optional<TreePath> visitLabeledStatement(@Nullable LabeledStatementTree node, Void v) { if (node == null) { return Optional.absent(); } else if (isMatch(node, node.getLabel())) { return currentPathPlus(node); } return super.visitLabeledStatement(node, v); }
@Override public Void visitLabeledStatement(LabeledStatementTree expected, Tree actual) { Optional<LabeledStatementTree> other = checkTypeAndCast(expected, actual); if (!other.isPresent()) { addTypeMismatch(expected, actual); return null; } checkForDiff(expected.getLabel().contentEquals(other.get().getLabel()), "Expected statement label to be <%s> but was <%s>.", expected.getLabel(), other.get().getLabel()); scan(expected.getStatement(), other.get().getStatement()); return null; }
public R visitLabeledStatement(LabeledStatementTree node, P p) { return scan(node.getStatement(), p); }
@Override public Optional<TreePath> visitLabeledStatement(@Nullable LabeledStatementTree node, Void v) { if (node == null) { return Optional.absent(); } else if (isMatch(node, node.getLabel())) { return currentPathPlus(node); } return super.visitLabeledStatement(node, v); }