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

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

Issue 11194017: Issue 5929. Ignore 'patch' before 'class'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/parser/DartParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
index 1880f3c35f8eb04df22da80766ce5735da45f7f6..e3d786119dee00fd6452dd9b64b91ae508b9cc08 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -167,6 +167,8 @@ public class DartParser extends CompletionHooksParserBase {
private static final String SHOW_KEYWORD = "show";
private static final String STATIC_KEYWORD = "static";
private static final String TYPEDEF_KEYWORD = "typedef";
+ // does not exist in specification
+ private static final String PATCH_KEYWORD = "patch";
public static final String[] PSEUDO_KEYWORDS = {
@@ -324,6 +326,9 @@ public class DartParser extends CompletionHooksParserBase {
isTopLevelAbstract = true;
topLevelAbstractModifierPosition = position();
}
+ // skip "patch" before "class"
+ if (peek(1) == Token.CLASS && optionalPseudoKeyword(PATCH_KEYWORD)) {
+ }
// Parse top level element.
if (optional(Token.CLASS)) {
isParsingClass = true;
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698