| Index: dart/lib/compiler/implementation/scanner/array_based_scanner.dart
|
| diff --git a/dart/lib/compiler/implementation/scanner/array_based_scanner.dart b/dart/lib/compiler/implementation/scanner/array_based_scanner.dart
|
| index c3dfb5fc88c9dc003feef2910cb4624222f45dfa..5e15bb5673497d3282e8f97428967eef5a92cd6a 100644
|
| --- a/dart/lib/compiler/implementation/scanner/array_based_scanner.dart
|
| +++ b/dart/lib/compiler/implementation/scanner/array_based_scanner.dart
|
| @@ -49,6 +49,10 @@ class ArrayBasedScanner<S extends SourceString> extends AbstractScanner<S> {
|
| }
|
|
|
| void appendKeywordToken(Keyword keyword) {
|
| + String syntax = keyword.syntax;
|
| +
|
| + // Type parameters and arguments cannot contain 'this' or 'super'.
|
| + if (syntax === 'this' || syntax === 'super') discardOpenLt();
|
| tail.next = new KeywordToken(keyword, tokenStart);
|
| tail = tail.next;
|
| }
|
| @@ -90,11 +94,7 @@ class ArrayBasedScanner<S extends SourceString> extends AbstractScanner<S> {
|
| Token token = new BeginGroupToken(info, value, tokenStart);
|
| tail.next = token;
|
| tail = tail.next;
|
| - while (info.kind !== LT_TOKEN &&
|
| - !groupingStack.isEmpty() &&
|
| - groupingStack.head.kind === LT_TOKEN) {
|
| - groupingStack = groupingStack.tail;
|
| - }
|
| + if (info.kind !== LT_TOKEN) discardOpenLt();
|
| groupingStack = groupingStack.prepend(token);
|
| }
|
|
|
|
|