Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: compiler/java/com/google/dart/compiler/parser/AbstractParser.java

Issue 10021017: Adds parser recovery for type parameters and type arguments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updates for completion to work Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/parser/AbstractParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/AbstractParser.java b/compiler/java/com/google/dart/compiler/parser/AbstractParser.java
index 5bbe6af34387f6a0355df684072f36968bfbebbb..431a057ff19b68af71286f4c8fe9abb2a408a361 100644
--- a/compiler/java/com/google/dart/compiler/parser/AbstractParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/AbstractParser.java
@@ -132,7 +132,6 @@ abstract class AbstractParser {
next();
}
}
-
return false;
}
return true;
@@ -221,6 +220,8 @@ abstract class AbstractParser {
Token expected, Token actual) {
if (expected == Token.EOS) {
reportError(position, ParserErrorCode.EXPECTED_EOS, actual);
+ } else if (expected == Token.IDENTIFIER) {
+ reportError(position, ParserErrorCode.INVALID_IDENTIFIER, actual);
} else if (expected == null) {
reportError(position, ParserErrorCode.UNEXPECTED_TOKEN, actual);
} else {

Powered by Google App Engine
This is Rietveld 408576698