| 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;
|
|
|