Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Side by Side Diff: pkg/compiler/lib/src/scanner/array_based_scanner.dart

Issue 1313073007: Move parser and token related libraries into their own subfolder. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix unittests and try Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 library dart2js.scanner.array_based; 5 library dart2js.scanner.array_based;
6 6
7 import '../io/source_file.dart' show 7 import '../io/source_file.dart' show
8 SourceFile; 8 SourceFile;
9 import '../util/characters.dart' show 9 import '../tokens/keyword.dart' show
10 $LF,
11 $STX;
12 import '../util/util.dart' show
13 Link;
14
15 import 'keyword.dart' show
16 Keyword; 10 Keyword;
17 import 'scanner.dart' show 11 import '../tokens/token.dart' show
18 AbstractScanner;
19 import 'token.dart' show
20 BeginGroupToken, 12 BeginGroupToken,
21 COMMENT_INFO, 13 COMMENT_INFO,
22 ErrorToken, 14 ErrorToken,
23 EOF_INFO, 15 EOF_INFO,
24 LT_TOKEN, 16 LT_TOKEN,
25 KeywordToken, 17 KeywordToken,
26 OPEN_CURLY_BRACKET_TOKEN, 18 OPEN_CURLY_BRACKET_TOKEN,
27 PrecedenceInfo, 19 PrecedenceInfo,
28 STRING_INTERPOLATION_TOKEN, 20 STRING_INTERPOLATION_TOKEN,
29 SymbolToken, 21 SymbolToken,
30 Token; 22 Token;
23 import '../util/characters.dart' show
24 $LF,
25 $STX;
26 import '../util/util.dart' show
27 Link;
28
29 import 'scanner.dart' show
30 AbstractScanner;
31 31
32 abstract class ArrayBasedScanner extends AbstractScanner { 32 abstract class ArrayBasedScanner extends AbstractScanner {
33 ArrayBasedScanner(SourceFile file, bool includeComments) 33 ArrayBasedScanner(SourceFile file, bool includeComments)
34 : super(file, includeComments); 34 : super(file, includeComments);
35 35
36 /** 36 /**
37 * The stack of open groups, e.g [: { ... ( .. :] 37 * The stack of open groups, e.g [: { ... ( .. :]
38 * Each BeginGroupToken has a pointer to the token where the group 38 * Each BeginGroupToken has a pointer to the token where the group
39 * ends. This field is set when scanning the end group token. 39 * ends. This field is set when scanning the end group token.
40 */ 40 */
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 * something which cannot possibly be part of a type parameter/argument 236 * something which cannot possibly be part of a type parameter/argument
237 * list, like the '=' in the above example. 237 * list, like the '=' in the above example.
238 */ 238 */
239 void discardOpenLt() { 239 void discardOpenLt() {
240 while (!groupingStack.isEmpty 240 while (!groupingStack.isEmpty
241 && identical(groupingStack.head.kind, LT_TOKEN)) { 241 && identical(groupingStack.head.kind, LT_TOKEN)) {
242 groupingStack = groupingStack.tail; 242 groupingStack = groupingStack.tail;
243 } 243 }
244 } 244 }
245 } 245 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/scanner/class_element_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698