protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
AbstractVariableDeclaration create() { return new LocalDeclaration(null, 0, 0); } },
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
AbstractVariableDeclaration create() { return new LocalDeclaration(null, 0, 0); } },
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
AbstractVariableDeclaration create() { return new LocalDeclaration(null, 0, 0); } },
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
protected void consumeCatchHeader() { // CatchDeclaration ::= 'catch' '(' FormalParameter ')' '{' if (this.currentElement == null){ return; // should never occur, this consumeRule is only used in recovery mode } // current element should be a block due to the presence of the opening brace if (!(this.currentElement instanceof RecoveredBlock)){ if(!(this.currentElement instanceof RecoveredMethod)) { return; } RecoveredMethod rMethod = (RecoveredMethod) this.currentElement; if(!(rMethod.methodBody == null && rMethod.bracketBalance > 0)) { return; } } Argument arg = (Argument)this.astStack[this.astPtr--]; // convert argument to local variable LocalDeclaration localDeclaration = new LocalDeclaration(arg.name, arg.sourceStart, arg.sourceEnd); localDeclaration.type = arg.type; localDeclaration.declarationSourceStart = arg.declarationSourceStart; localDeclaration.declarationSourceEnd = arg.declarationSourceEnd; this.currentElement = this.currentElement.add(localDeclaration, 0); this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position this.restartRecovery = true; // request to restart from here on this.lastIgnoredToken = -1; } protected void consumeCatchType() {
protected void consumeCatchHeader() { // CatchDeclaration ::= 'catch' '(' FormalParameter ')' '{' if (this.currentElement == null){ return; // should never occur, this consumeRule is only used in recovery mode } // current element should be a block due to the presence of the opening brace if (!(this.currentElement instanceof RecoveredBlock)){ if(!(this.currentElement instanceof RecoveredMethod)) { return; } RecoveredMethod rMethod = (RecoveredMethod) this.currentElement; if(!(rMethod.methodBody == null && rMethod.bracketBalance > 0)) { return; } } Argument arg = (Argument)this.astStack[this.astPtr--]; // convert argument to local variable LocalDeclaration localDeclaration = new LocalDeclaration(arg.name, arg.sourceStart, arg.sourceEnd); localDeclaration.type = arg.type; localDeclaration.declarationSourceStart = arg.declarationSourceStart; localDeclaration.declarationSourceEnd = arg.declarationSourceEnd; this.currentElement = this.currentElement.add(localDeclaration, 0); this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position this.restartRecovery = true; // request to restart from here on this.lastIgnoredToken = -1; } protected void consumeCatchType() {
protected void consumeCatchHeader() { // CatchDeclaration ::= 'catch' '(' FormalParameter ')' '{' if (this.currentElement == null){ return; // should never occur, this consumeRule is only used in recovery mode } // current element should be a block due to the presence of the opening brace if (!(this.currentElement instanceof RecoveredBlock)){ if(!(this.currentElement instanceof RecoveredMethod)) { return; } RecoveredMethod rMethod = (RecoveredMethod) this.currentElement; if(!(rMethod.methodBody == null && rMethod.bracketBalance > 0)) { return; } } Argument arg = (Argument)this.astStack[this.astPtr--]; // convert argument to local variable LocalDeclaration localDeclaration = new LocalDeclaration(arg.name, arg.sourceStart, arg.sourceEnd); localDeclaration.type = arg.type; localDeclaration.declarationSourceStart = arg.declarationSourceStart; localDeclaration.declarationSourceEnd = arg.declarationSourceEnd; this.currentElement = this.currentElement.add(localDeclaration, 0); this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position this.restartRecovery = true; // request to restart from here on this.lastIgnoredToken = -1; } protected void consumeCatchType() {
protected void consumeCatchHeader() { // CatchDeclaration ::= 'catch' '(' FormalParameter ')' '{' if (this.currentElement == null){ return; // should never occur, this consumeRule is only used in recovery mode } // current element should be a block due to the presence of the opening brace if (!(this.currentElement instanceof RecoveredBlock)){ if(!(this.currentElement instanceof RecoveredMethod)) { return; } RecoveredMethod rMethod = (RecoveredMethod) this.currentElement; if(!(rMethod.methodBody == null && rMethod.bracketBalance > 0)) { return; } } Argument arg = (Argument)this.astStack[this.astPtr--]; // convert argument to local variable LocalDeclaration localDeclaration = new LocalDeclaration(arg.name, arg.sourceStart, arg.sourceEnd); localDeclaration.type = arg.type; localDeclaration.declarationSourceStart = arg.declarationSourceStart; localDeclaration.declarationSourceEnd = arg.declarationSourceEnd; this.currentElement = this.currentElement.add(localDeclaration, 0); this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position this.restartRecovery = true; // request to restart from here on this.lastIgnoredToken = -1; } protected void consumeCatchType() {
protected void consumeCatchHeader() { // CatchDeclaration ::= 'catch' '(' FormalParameter ')' '{' if (this.currentElement == null){ return; // should never occur, this consumeRule is only used in recovery mode } // current element should be a block due to the presence of the opening brace if (!(this.currentElement instanceof RecoveredBlock)){ if(!(this.currentElement instanceof RecoveredMethod)) { return; } RecoveredMethod rMethod = (RecoveredMethod) this.currentElement; if(!(rMethod.methodBody == null && rMethod.bracketBalance > 0)) { return; } } Argument arg = (Argument)this.astStack[this.astPtr--]; // convert argument to local variable LocalDeclaration localDeclaration = new LocalDeclaration(arg.name, arg.sourceStart, arg.sourceEnd); localDeclaration.type = arg.type; localDeclaration.declarationSourceStart = arg.declarationSourceStart; localDeclaration.declarationSourceEnd = arg.declarationSourceEnd; this.currentElement = this.currentElement.add(localDeclaration, 0); this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position this.restartRecovery = true; // request to restart from here on this.lastIgnoredToken = -1; } protected void consumeCatchType() {
protected void consumeCatchHeader() { // CatchDeclaration ::= 'catch' '(' FormalParameter ')' '{' if (this.currentElement == null){ return; // should never occur, this consumeRule is only used in recovery mode } // current element should be a block due to the presence of the opening brace if (!(this.currentElement instanceof RecoveredBlock)){ if(!(this.currentElement instanceof RecoveredMethod)) { return; } RecoveredMethod rMethod = (RecoveredMethod) this.currentElement; if(!(rMethod.methodBody == null && rMethod.bracketBalance > 0)) { return; } } Argument arg = (Argument)this.astStack[this.astPtr--]; // convert argument to local variable LocalDeclaration localDeclaration = new LocalDeclaration(arg.name, arg.sourceStart, arg.sourceEnd); localDeclaration.type = arg.type; localDeclaration.declarationSourceStart = arg.declarationSourceStart; localDeclaration.declarationSourceEnd = arg.declarationSourceEnd; this.currentElement = this.currentElement.add(localDeclaration, 0); this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position this.restartRecovery = true; // request to restart from here on this.lastIgnoredToken = -1; } protected void consumeCatchType() {