Chromium Code Reviews| Index: pkg/compiler/lib/src/parser/parser.dart |
| diff --git a/pkg/compiler/lib/src/parser/parser.dart b/pkg/compiler/lib/src/parser/parser.dart |
| index 821fcad03d8d64496ba4c78f3bc4c16fab8fa862..285a4197719d801a445297fdd0968a163daea373 100644 |
| --- a/pkg/compiler/lib/src/parser/parser.dart |
| +++ b/pkg/compiler/lib/src/parser/parser.dart |
| @@ -28,6 +28,7 @@ import '../tokens/precedence_constants.dart' |
| import '../tokens/token.dart' |
| show |
| BeginGroupToken, |
| + ErrorToken, |
| isUserDefinableOperator, |
| KeywordToken, |
| SymbolToken, |
| @@ -1000,7 +1001,11 @@ class Parser { |
| ? MessageKind.EXTRANEOUS_MODIFIER |
| : MessageKind.EXTRANEOUS_MODIFIER_REPLACE; |
| for (Token modifier in modifierList) { |
| - listener.reportError(modifier, kind, {'modifier': modifier}); |
| + if (modifier is ErrorToken) { |
|
ahe
2016/05/03 11:11:38
Modify Listenener.reportError instead.
Johnni Winther
2016/05/04 08:07:31
Done.
|
| + listener.reportErrorToken(modifier); |
| + } else { |
| + listener.reportError(modifier, kind, {'modifier': modifier}); |
| + } |
| } |
| return null; |
| } |