Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorssankaran2013-03-02 06:20:38 +0000
committerssankaran2013-03-02 06:20:38 +0000
commitc35f48a470f9475e0b73c6c14c2a26ca2378ab58 (patch)
tree8fe112b08f71e7267c2cf4f39c44fd2e4c54f7e9 /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
parent11ac720cf12c89391a32ed5e56750070174f7f3f (diff)
downloadeclipse.jdt.core-c35f48a470f9475e0b73c6c14c2a26ca2378ab58.tar.gz
eclipse.jdt.core-c35f48a470f9475e0b73c6c14c2a26ca2378ab58.tar.xz
eclipse.jdt.core-c35f48a470f9475e0b73c6c14c2a26ca2378ab58.zip
Fixed Bug 402198 - [1.8][compiler][infrastructure] Enhance
IErrorHandlingPolicy to support a new policy: ignore all errors.
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index 9b5c41c429..0002634817 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -10228,11 +10228,11 @@ public void goForCompilationUnit(){
this.scanner.foundTaskCount = 0;
this.scanner.recordLineSeparator = true;
}
-public void goForExpression() {
+public void goForExpression(boolean recordLineSeparator) {
//tells the scanner to go for an expression parsing
this.firstToken = TokenNameREMAINDER;
- this.scanner.recordLineSeparator = true; // recovery goals must record line separators
+ this.scanner.recordLineSeparator = recordLineSeparator; // recovery goals must record line separators
}
public void goForFieldDeclaration(){
//tells the scanner to go for field declaration parsing
@@ -11040,7 +11040,7 @@ public void parse(
//convert bugs into parse error
initialize();
- goForExpression();
+ goForExpression(true /* record line separators */);
this.nestedMethod[this.nestedType]++;
this.referenceContext = type;
@@ -11376,10 +11376,10 @@ public ASTNode[] parseClassBodyDeclarations(char[] source, int offset, int lengt
}
return result;
}
-public Expression parseExpression(char[] source, int offset, int length, CompilationUnitDeclaration unit) {
+public Expression parseExpression(char[] source, int offset, int length, CompilationUnitDeclaration unit, boolean recordLineSeparators) {
initialize();
- goForExpression();
+ goForExpression(recordLineSeparators);
this.nestedMethod[this.nestedType]++;
this.referenceContext = unit;

Back to the top