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 de0306f68f7c9a3cc8eca99b9598f94f1bbd2b18..9774a7331e8191f050417d6347cfe1252ec51510 100644 |
| --- a/pkg/analyzer/lib/src/generated/parser.dart |
| +++ b/pkg/analyzer/lib/src/generated/parser.dart |
| @@ -6101,9 +6101,13 @@ class Parser { |
| keyword = getAndAdvance(); |
| if (!_parseAsync) { |
| _reportErrorForToken(ParserErrorCode.ASYNC_NOT_SUPPORTED, keyword); |
| + keyword = null; |
|
Brian Wilkerson
2016/01/13 21:38:01
I don't think we want to make these changes to the
danrubel
2016/01/13 22:02:20
Yes. There are a number of places in the resolver
|
| } |
| if (_matches(TokenType.STAR)) { |
| star = getAndAdvance(); |
| + if (!_parseAsync) { |
| + star = null; |
| + } |
| _inGenerator = true; |
| } |
| _inAsync = true; |
| @@ -6111,9 +6115,13 @@ class Parser { |
| keyword = getAndAdvance(); |
| if (!_parseAsync) { |
| _reportErrorForToken(ParserErrorCode.ASYNC_NOT_SUPPORTED, keyword); |
| + keyword = null; |
| } |
| if (_matches(TokenType.STAR)) { |
| star = getAndAdvance(); |
| + if (!_parseAsync) { |
| + star = null; |
| + } |
| _inGenerator = true; |
| } |
| } |
| @@ -9381,8 +9389,8 @@ class ParserErrorCode extends ErrorCode { |
| /** |
| * Some environments, such as Fletch, do not support async. |
| */ |
| - static const CompileTimeErrorCode ASYNC_NOT_SUPPORTED = |
| - const CompileTimeErrorCode('ASYNC_NOT_SUPPORTED', |
| + static const ParserErrorCode ASYNC_NOT_SUPPORTED = |
| + const ParserErrorCode('ASYNC_NOT_SUPPORTED', |
| "Async and sync are not supported in this environment."); |
| static const ParserErrorCode BREAK_OUTSIDE_OF_LOOP = const ParserErrorCode( |