Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/scanner/parser.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/scanner/parser.dart b/sdk/lib/_internal/compiler/implementation/scanner/parser.dart |
| index 2909cc9e8bbe8c63146b326acdb644364fa526e3..91aa70be1edb080292ed7ddb825dbd7bfe44272c 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/scanner/parser.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/scanner/parser.dart |
| @@ -266,7 +266,7 @@ class Parser { |
| token = parseIdentifier(token.next); |
| token = parseTypeVariablesOpt(token); |
| token = expect('=', token); |
| - token = parseMixinApplication(token); |
| + token = parseMixinApplication(token, true); |
| listener.endNamedMixinApplication(typedefKeyword, token); |
| } else { |
| listener.beginFunctionTypeAlias(token); |
| @@ -279,9 +279,13 @@ class Parser { |
| return expect(';', token); |
| } |
| - Token parseMixinApplication(Token token) { |
| + Token parseMixinApplication(Token token, bool isTypedef) { |
|
Johnni Winther
2013/01/21 11:15:22
Make isTypedef a named parameter. Helps reading ca
kasperl
2013/01/21 11:16:30
Only problem is that I'd prefer not to make it opt
|
| listener.beginMixinApplication(token); |
| - token = parseModifiers(token); |
| + if (isTypedef) { |
| + token = parseModifiers(token); |
| + } else { |
| + listener.handleModifiers(0); |
| + } |
| token = parseType(token); |
| token = expect('with', token); |
| token = parseTypeList(token); |
| @@ -485,8 +489,7 @@ class Parser { |
| if (optional('extends', token)) { |
| extendsKeyword = token; |
| if (optional('with', token.next.next)) { |
| - // TODO(kasperl): Disallow modifiers here. |
| - token = parseMixinApplication(token.next); |
| + token = parseMixinApplication(token.next, false); |
| } else { |
| token = parseType(token.next); |
| } |