Example usage for org.eclipse.jdt.internal.compiler.ast DoStatement DoStatement

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

Introduction

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

Prototype

public DoStatement(Expression condition, Statement action, int sourceStart, int sourceEnd) 

Source Link

Usage

From source file:lombok.eclipse.handlers.ast.EclipseASTMaker.java

License:Open Source License

@Override
public ASTNode visitDoWhile(final lombok.ast.DoWhile node, final Void p) {
    final DoStatement doStatement = new DoStatement(build(node.getCondition(), Expression.class),
            build(node.getAction(), Statement.class), 0, 0);
    setGeneratedByAndCopyPos(doStatement, source, posHintOf(node));
    return doStatement;
}

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

License:Open Source License

protected void consumeStatementDo() {
    // DoStatement ::= 'do' Statement 'while' '(' Expression ')' ';'

    //the 'while' pushes a value on this.intStack that we need to remove
    this.intPtr--;

    Statement statement = (Statement) this.astStack[this.astPtr];
    this.expressionLengthPtr--;
    this.astStack[this.astPtr] = new DoStatement(this.expressionStack[this.expressionPtr--], statement,
            this.intStack[this.intPtr--], this.endStatementPosition);
}

From source file:org.nabucco.framework.mda.template.java.extract.statement.JavaAstStatementExtractorVisitor.java

License:Open Source License

@Override
public boolean visit(DoStatement doStatement, BlockScope scope) {

    Expression condition = copy(doStatement.condition, scope);
    Statement action = copy(doStatement.action, scope);

    DoStatement statementCopy = new DoStatement(condition, action, doStatement.sourceStart,
            doStatement.sourceEnd);// ww w.j av  a 2  s  .co m

    this.statement = statementCopy;

    return false;
}