OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:async' show | 5 import 'dart:async' show |
6 Future; | 6 Future; |
7 | 7 |
8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
9 | 9 |
10 import 'package:compiler/src/scanner/scannerlib.dart' show | 10 import 'package:compiler/src/tokens/precedence_constants.dart' show |
11 EOF_INFO, | 11 EOF_INFO, |
12 STRING_INFO, | 12 STRING_INFO, |
13 OPEN_CURLY_BRACKET_INFO, | 13 OPEN_CURLY_BRACKET_INFO, |
14 CLOSE_CURLY_BRACKET_INFO, | 14 CLOSE_CURLY_BRACKET_INFO; |
15 | 15 |
| 16 import 'package:compiler/src/tokens/token.dart' show |
16 Token, | 17 Token, |
17 KeywordToken, | 18 KeywordToken, |
18 StringToken, | 19 StringToken, |
19 SymbolToken, | 20 SymbolToken, |
20 ErrorToken; | 21 ErrorToken; |
21 | 22 |
22 import 'test.dart' show | 23 import 'test.dart' show |
23 Test; | 24 Test; |
24 | 25 |
25 import 'package:servicec/scanner.dart' show | 26 import 'package:servicec/scanner.dart' show |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 var scanner = new Scanner(input); | 97 var scanner = new Scanner(input); |
97 Token tokenLinkedList = scanner.tokenize(); | 98 Token tokenLinkedList = scanner.tokenize(); |
98 | 99 |
99 int index = 0; | 100 int index = 0; |
100 while (tokenLinkedList.info != EOF_INFO) { | 101 while (tokenLinkedList.info != EOF_INFO) { |
101 identity = reduce(tokenLinkedList, index++, identity); | 102 identity = reduce(tokenLinkedList, index++, identity); |
102 tokenLinkedList = tokenLinkedList.next; | 103 tokenLinkedList = tokenLinkedList.next; |
103 } | 104 } |
104 return identity; | 105 return identity; |
105 } | 106 } |
OLD | NEW |