Example usage for org.eclipse.jdt.internal.compiler.ast ASTNode DocumentedFallthrough

List of usage examples for org.eclipse.jdt.internal.compiler.ast ASTNode DocumentedFallthrough

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast ASTNode DocumentedFallthrough.

Prototype

int DocumentedFallthrough

To view the source code for org.eclipse.jdt.internal.compiler.ast ASTNode DocumentedFallthrough.

Click Source Link

Usage

From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java

License:Open Source License

protected void consumeCaseLabel() {
    // SwitchLabel ::= 'case' ConstantExpression ':'
    this.expressionLengthPtr--;
    Expression expression = this.expressionStack[this.expressionPtr--];
    CaseStatement caseStatement = new CaseStatement(expression, expression.sourceEnd,
            this.intStack[this.intPtr--]);
    // Look for $fall-through$ tag in leading comment for case statement
    if (hasLeadingTagComment(FALL_THROUGH_TAG, caseStatement.sourceStart)) {
        caseStatement.bits |= ASTNode.DocumentedFallthrough;
    }/*from   w ww  . j  a  v  a 2  s. c  om*/
    pushOnAstStack(caseStatement);
}

From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java

License:Open Source License

protected void consumeDefaultLabel() {
    // SwitchLabel ::= 'default' ':'
    CaseStatement defaultStatement = new CaseStatement(null, this.intStack[this.intPtr--],
            this.intStack[this.intPtr--]);
    // Look for $fall-through$ tag in leading comment for case statement
    if (hasLeadingTagComment(FALL_THROUGH_TAG, defaultStatement.sourceStart)) {
        defaultStatement.bits |= ASTNode.DocumentedFallthrough;
    }//  w  w w.  j a va 2  s  .  c  o  m
    pushOnAstStack(defaultStatement);
}