/** * Records the scanner position if we're parsing a top level type. */ private void recordLastStatementIfNeeded() { if ((isTopLevelType()) && (this.scanner.startPosition <= this.codeSnippetEnd+this.lineSeparatorLength /*14838*/)) { this.lastStatement = this.scanner.startPosition; } }
/** * Records the scanner position if we're parsing a top level type. */ private void recordLastStatementIfNeeded() { if ((isTopLevelType()) && (this.scanner.startPosition <= this.codeSnippetEnd+this.lineSeparatorLength /*14838*/)) { this.lastStatement = this.scanner.startPosition; } }
/** * Records the scanner position if we're parsing a top level type. */ private void recordLastStatementIfNeeded() { if ((isTopLevelType()) && (this.scanner.startPosition <= this.codeSnippetEnd+this.lineSeparatorLength /*14838*/)) { this.lastStatement = this.scanner.startPosition; } }
/** * Records the scanner position if we're parsing a top level type. */ private void recordLastStatementIfNeeded() { if ((isTopLevelType()) && (this.scanner.startPosition <= this.codeSnippetEnd+this.lineSeparatorLength /*14838*/)) { this.lastStatement = this.scanner.startPosition; } }
/** * Records the scanner position if we're parsing a top level type. */ private void recordLastStatementIfNeeded() { if ((isTopLevelType()) && (this.scanner.startPosition <= this.codeSnippetEnd+this.lineSeparatorLength /*14838*/)) { this.lastStatement = this.scanner.startPosition; } }
/** * Records the scanner position if we're parsing a top level type. */ private void recordLastStatementIfNeeded() { if ((isTopLevelType()) && (this.scanner.startPosition <= this.codeSnippetEnd+this.lineSeparatorLength /*14838*/)) { this.lastStatement = this.scanner.startPosition; } }
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
@Override protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } @Override
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
protected void consumeMethodInvocationNameWithTypeArguments() { // MethodInvocation ::= Name '.' TypeArguments 'Identifier' '(' ArgumentListopt ')' // when the name is only an identifier...we have a message send to "this" (implicit) if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { MessageSend m = newMessageSendWithTypeArguments(); m.sourceEnd = this.rParenPos; m.sourceStart = (int) ((m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]) >>> 32); m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; // handle type arguments int length = this.genericsLengthStack[this.genericsLengthPtr--]; this.genericsPtr -= length; System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length); this.intPtr--; m.receiver = getUnspecifiedReference(); m.sourceStart = m.receiver.sourceStart; pushOnExpressionStack(m); } else { super.consumeMethodInvocationNameWithTypeArguments(); } } protected void consumeMethodInvocationSuper() {
protected void consumeStatementReturn() { // ReturnStatement ::= 'return' Expressionopt ';' // returned value intercepted by code snippet // support have to be defined at toplevel only if ((this.hasRecoveredOnExpression || (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd+1+this.lineSeparatorLength /* 14838*/)) && this.expressionLengthStack[this.expressionLengthPtr] != 0 && isTopLevelType()) { this.expressionLengthPtr--; Expression expression = this.expressionStack[this.expressionPtr--]; pushOnAstStack( new CodeSnippetReturnStatement( expression, expression.sourceStart, expression.sourceEnd)); } else { super.consumeStatementReturn(); } /* recovery */ recordLastStatementIfNeeded(); } protected void consumeStatementSwitch() {
protected void consumeStatementReturn() { // ReturnStatement ::= 'return' Expressionopt ';' // returned value intercepted by code snippet // support have to be defined at toplevel only if ((this.hasRecoveredOnExpression || (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd+1+this.lineSeparatorLength /* 14838*/)) && this.expressionLengthStack[this.expressionLengthPtr] != 0 && isTopLevelType()) { this.expressionLengthPtr--; Expression expression = this.expressionStack[this.expressionPtr--]; pushOnAstStack( new CodeSnippetReturnStatement( expression, expression.sourceStart, expression.sourceEnd)); } else { super.consumeStatementReturn(); } /* recovery */ recordLastStatementIfNeeded(); } protected void consumeStatementSwitch() {
protected void consumeStatementReturn() { // ReturnStatement ::= 'return' Expressionopt ';' // returned value intercepted by code snippet // support have to be defined at toplevel only if ((this.hasRecoveredOnExpression || (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd+1+this.lineSeparatorLength /* 14838*/)) && this.expressionLengthStack[this.expressionLengthPtr] != 0 && isTopLevelType()) { this.expressionLengthPtr--; Expression expression = this.expressionStack[this.expressionPtr--]; pushOnAstStack( new CodeSnippetReturnStatement( expression, expression.sourceStart, expression.sourceEnd)); } else { super.consumeStatementReturn(); } /* recovery */ recordLastStatementIfNeeded(); } protected void consumeStatementSwitch() {
protected void consumeStatementReturn() { // ReturnStatement ::= 'return' Expressionopt ';' // returned value intercepted by code snippet // support have to be defined at toplevel only if ((this.hasRecoveredOnExpression || (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd+1+this.lineSeparatorLength /* 14838*/)) && this.expressionLengthStack[this.expressionLengthPtr] != 0 && isTopLevelType()) { this.expressionLengthPtr--; Expression expression = this.expressionStack[this.expressionPtr--]; pushOnAstStack( new CodeSnippetReturnStatement( expression, expression.sourceStart, expression.sourceEnd)); } else { super.consumeStatementReturn(); } /* recovery */ recordLastStatementIfNeeded(); } protected void consumeStatementSwitch() {
@Override protected void consumeStatementReturn() { // ReturnStatement ::= 'return' Expressionopt ';' // returned value intercepted by code snippet // support have to be defined at toplevel only if ((this.hasRecoveredOnExpression || (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd+1+this.lineSeparatorLength /* 14838*/)) && this.expressionLengthStack[this.expressionLengthPtr] != 0 && isTopLevelType()) { this.expressionLengthPtr--; Expression expression = this.expressionStack[this.expressionPtr--]; pushOnAstStack( new CodeSnippetReturnStatement( expression, expression.sourceStart, expression.sourceEnd)); } else { super.consumeStatementReturn(); } /* recovery */ recordLastStatementIfNeeded(); } @Override
protected void consumeStatementReturn() { // ReturnStatement ::= 'return' Expressionopt ';' // returned value intercepted by code snippet // support have to be defined at toplevel only if ((this.hasRecoveredOnExpression || (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd+1+this.lineSeparatorLength /* 14838*/)) && this.expressionLengthStack[this.expressionLengthPtr] != 0 && isTopLevelType()) { this.expressionLengthPtr--; Expression expression = this.expressionStack[this.expressionPtr--]; pushOnAstStack( new CodeSnippetReturnStatement( expression, expression.sourceStart, expression.sourceEnd)); } else { super.consumeStatementReturn(); } /* recovery */ recordLastStatementIfNeeded(); } protected void consumeStatementSwitch() {