List of usage examples for org.eclipse.jdt.internal.compiler.ast EmptyStatement EmptyStatement
public EmptyStatement(int startPosition, int endPosition)
From source file:lombok.eclipse.handlers.ast.EclipseASTMaker.java
License:Open Source License
private Statement getEmptyStatement(final lombok.ast.Node<?> node) { final EmptyStatement emptyStatement = new EmptyStatement(0, 0); setGeneratedByAndCopyPos(emptyStatement, source, posHintOf(node)); return emptyStatement; }
From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java
License:Open Source License
protected void consumeEmptyStatement() { // EmptyStatement ::= ';' char[] source = this.scanner.source; if (source[this.endStatementPosition] == ';') { pushOnAstStack(new EmptyStatement(this.endStatementPosition, this.endStatementPosition)); } else {/*from w w w . jav a2 s . c o m*/ if (source.length > 5) { int c1 = 0, c2 = 0, c3 = 0, c4 = 0; int pos = this.endStatementPosition - 4; while (source[pos] == 'u') { pos--; } if (source[pos] == '\\' && !((c1 = ScannerHelper.getNumericValue(source[this.endStatementPosition - 3])) > 15 || c1 < 0 || (c2 = ScannerHelper.getNumericValue(source[this.endStatementPosition - 2])) > 15 || c2 < 0 || (c3 = ScannerHelper.getNumericValue(source[this.endStatementPosition - 1])) > 15 || c3 < 0 || (c4 = ScannerHelper.getNumericValue(source[this.endStatementPosition])) > 15 || c4 < 0) && ((char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4)) == ';') { // we have a Unicode for the ';' (/u003B) pushOnAstStack(new EmptyStatement(pos, this.endStatementPosition)); return; } } pushOnAstStack(new EmptyStatement(this.endPosition + 1, this.endStatementPosition)); } }
From source file:org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator.java
License:Open Source License
public Statement emptyStatement() { return new EmptyStatement(this.sourceStart, this.sourceEnd) { @Override// ww w. j a v a2s .c om public void resolve(BlockScope scope) { /* nop: no warning. */ } }; }
From source file:org.nabucco.framework.mda.template.java.extract.statement.JavaAstStatementExtractorVisitor.java
License:Open Source License
@Override public boolean visit(EmptyStatement emptyStatement, BlockScope scope) { EmptyStatement emptyCopy = new EmptyStatement(emptyStatement.sourceStart, emptyStatement.sourceEnd); this.statement = emptyCopy; return false; }