OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch 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 library servicec.scanner; | 5 library servicec.scanner; |
6 | 6 |
7 import "package:compiler/src/scanner/scannerlib.dart" show | 7 import 'package:compiler/src/tokens/token.dart' show |
8 GT_INFO, | 8 StringToken, |
9 EOF_INFO, | |
10 ErrorToken, | 9 ErrorToken, |
11 IDENTIFIER_INFO, | |
12 KEYWORD_TOKEN, | |
13 Keyword, | |
14 KeywordToken, | 10 KeywordToken, |
15 PrecedenceInfo, | |
16 STRING_INFO, | |
17 StringScanner, | |
18 StringToken, | |
19 SymbolToken, | 11 SymbolToken, |
20 Token, | 12 Token, |
21 UnmatchedToken; | 13 UnmatchedToken; |
22 | 14 |
| 15 import 'package:compiler/src/tokens/precedence_constants.dart' show |
| 16 GT_INFO, |
| 17 EOF_INFO, |
| 18 IDENTIFIER_INFO, |
| 19 STRING_INFO; |
| 20 |
| 21 import 'package:compiler/src/tokens/precedence.dart' show |
| 22 PrecedenceInfo; |
| 23 |
| 24 import "package:compiler/src/tokens/keyword.dart" show |
| 25 Keyword; |
| 26 |
| 27 import "package:compiler/src/scanner/string_scanner.dart" show |
| 28 StringScanner; |
| 29 |
23 import "package:compiler/src/util/characters.dart" show | 30 import "package:compiler/src/util/characters.dart" show |
24 $LF; | 31 $LF; |
25 | 32 |
26 import "keyword.dart" as own; | 33 import "keyword.dart" as own; |
27 | 34 |
28 const int LF_TOKEN = $LF; | 35 const int LF_TOKEN = $LF; |
29 const PrecedenceInfo LF_INFO = const PrecedenceInfo('<new-line>', 0, LF_TOKEN); | 36 const PrecedenceInfo LF_INFO = const PrecedenceInfo('<new-line>', 0, LF_TOKEN); |
30 | 37 |
31 class Scanner extends StringScanner { | 38 class Scanner extends StringScanner { |
32 Scanner(String input) | 39 Scanner(String input) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 if (next == $LF) { | 78 if (next == $LF) { |
72 tail.next = new SymbolToken(LF_INFO, stringOffset); | 79 tail.next = new SymbolToken(LF_INFO, stringOffset); |
73 tail = tail.next; | 80 tail = tail.next; |
74 } | 81 } |
75 } | 82 } |
76 } | 83 } |
77 | 84 |
78 bool isServicecKeyword(String string) { | 85 bool isServicecKeyword(String string) { |
79 return own.Keyword.keywords.containsKey(string); | 86 return own.Keyword.keywords.containsKey(string); |
80 } | 87 } |
OLD | NEW |