Java 类org.eclipse.jdt.internal.compiler.ast.BreakStatement 实例源码

项目:Eclipse-Postfix-Code-Completion    文件:Parser.java   
protected void consumeStatementBreak() {
    // BreakStatement ::= 'break' ';'
    // break pushes a position on this.intStack in case there is no label

    pushOnAstStack(new BreakStatement(null, this.intStack[this.intPtr--], this.endStatementPosition));

    if (this.pendingRecoveredType != null) {
        // Used only in statements recovery.
        // This is not a real break statement but a placeholder for an existing local type.
        // The break statement must be replace by the local type.
        if (this.pendingRecoveredType.allocation == null &&
                this.endPosition <= this.pendingRecoveredType.declarationSourceEnd) {
            this.astStack[this.astPtr] = this.pendingRecoveredType;
            this.pendingRecoveredType = null;
            return;
        }
        this.pendingRecoveredType = null;
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:CodeFormatterVisitor.java   
/**
 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.BreakStatement, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
 */
public boolean visit(BreakStatement breakStatement, BlockScope scope) {

    this.scribe.printNextToken(TerminalTokens.TokenNamebreak);
    if (breakStatement.label != null) {
        this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
    }
    this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
    this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
    return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:Parser.java   
protected void consumeStatementBreakWithLabel() {
    // BreakStatement ::= 'break' Identifier ';'
    // break pushs a position on this.intStack in case there is no label

    pushOnAstStack(
        new BreakStatement(
            this.identifierStack[this.identifierPtr--],
            this.intStack[this.intPtr--],
            this.endStatementPosition));
    this.identifierLengthPtr--;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:CodeFormatterVisitor.java   
/**
 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.BreakStatement, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
 */
public boolean visit(BreakStatement breakStatement, BlockScope scope) {

    this.scribe.printNextToken(TerminalTokens.TokenNamebreak);
    if (breakStatement.label != null) {
        this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
    }
    this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
    this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
    return false;
}
项目:xapi    文件:GwtAstBuilder.java   
@Override
public void endVisit(BreakStatement x, BlockScope scope) {
  try {
    SourceInfo info = makeSourceInfo(x);
    push(new JBreakStatement(info, getOrCreateLabel(info, x.label)));
  } catch (Throwable e) {
    throw translateException(x, e);
  }
}
项目:lombok-ianchiu    文件:SetGeneratedByVisitor.java   
@Override public boolean visit(BreakStatement node, BlockScope scope) {
    fixPositions(setGeneratedBy(node, source));
    return super.visit(node, scope);
}
项目:EasyMPermission    文件:SetGeneratedByVisitor.java   
@Override public boolean visit(BreakStatement node, BlockScope scope) {
    fixPositions(setGeneratedBy(node, source));
    return super.visit(node, scope);
}
项目:lombok    文件:SetGeneratedByVisitor.java   
@Override public boolean visit(BreakStatement node, BlockScope scope) {
    setGeneratedBy(node, source);
    applyOffsetASTNode(node);
    return super.visit(node, scope);
}