Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/parser.dart |
| diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart |
| index 50db79161cab990df939a00c2bdc7c6078ea3810..0d2cbc08af064eb694c273ed3920973d8a50b3e4 100644 |
| --- a/pkg/analyzer/lib/src/generated/parser.dart |
| +++ b/pkg/analyzer/lib/src/generated/parser.dart |
| @@ -5952,7 +5952,7 @@ class Parser { |
| * associated with the directive. Return the import directive that was parsed. |
| * |
| * importDirective ::= |
| - * metadata 'import' stringLiteral ('as' identifier)? combinator*';' |
| + * metadata 'import' stringLiteral (deferred)? ('as' identifier)? combinator*';' |
| */ |
| ImportDirective _parseImportDirective(CommentAndMetadata commentAndMetadata) { |
| Token importKeyword = _expectKeyword(Keyword.IMPORT); |
| @@ -5969,6 +5969,13 @@ class Parser { |
| } else if (deferredToken != null) { |
| _reportErrorForCurrentToken( |
| ParserErrorCode.MISSING_PREFIX_IN_DEFERRED_IMPORT); |
| + } else if (!_matches(TokenType.SEMICOLON) && |
| + _tokenMatchesKeyword(_peek(), Keyword.AS)) { |
|
Brian Wilkerson
2015/04/07 23:09:14
We might want to allow either 'as', 'show' or 'hid
danrubel
2015/04/08 14:51:25
Good suggestion. https://codereview.chromium.org/1
|
| + _reportErrorForCurrentToken( |
| + ParserErrorCode.UNEXPECTED_TOKEN, [_currentToken]); |
| + _advance(); |
| + asToken = getAndAdvance(); |
| + prefix = parseSimpleIdentifier(); |
| } |
| List<Combinator> combinators = _parseCombinators(); |
| Token semicolon = _expectSemicolon(); |