Chromium Code Reviews| 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..c282f79421bd20689a70e3ff64c0137e13f306b1 100644 |
| --- a/dart/lib/compiler/implementation/scanner/array_based_scanner.dart |
| +++ b/dart/lib/compiler/implementation/scanner/array_based_scanner.dart |
| @@ -49,6 +49,8 @@ class ArrayBasedScanner<S extends SourceString> extends AbstractScanner<S> { |
| } |
| void appendKeywordToken(Keyword keyword) { |
| + final syntax = keyword.syntax; |
|
Lasse Reichstein Nielsen
2012/06/15 11:51:13
Please write the type of the variable. In this cas
ahe
2012/06/15 13:12:34
Good point.
Please be aware that when I'm writing
|
| + if (syntax === 'this' || syntax === 'super') discardOpenLt(); |
| tail.next = new KeywordToken(keyword, tokenStart); |
| tail = tail.next; |
| } |
| @@ -90,11 +92,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); |
| } |