use of com.google.devtools.j2objc.ast.LabeledStatement in project j2objc by google.
the class NilCheckResolver method visit.
@Override
public boolean visit(LabeledStatement node) {
Statement body = node.getBody();
if (body != null) {
pushLabeledScope(node.getLabel().getIdentifier());
body.accept(this);
popAndMerge();
}
return false;
}
use of com.google.devtools.j2objc.ast.LabeledStatement in project j2objc by google.
the class EnhancedForRewriter method replaceLoop.
private void replaceLoop(EnhancedForStatement oldLoop, Statement replacement, Statement newLoop) {
if (oldLoop.getParent() instanceof LabeledStatement) {
LabeledStatement labeledStmt = (LabeledStatement) oldLoop.getParent();
labeledStmt.replaceWith(replacement);
newLoop.replaceWith(labeledStmt);
labeledStmt.setBody(newLoop);
} else {
oldLoop.replaceWith(replacement);
}
}
Aggregations