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

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

Issue 1315483006: Split scannerlib.dart into several libraries. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update try tests 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of scanner; 5 library dart2js.scanner;
6
7 import '../io/source_file.dart' show
8 SourceFile,
9 Utf8BytesSourceFile;
10 import '../util/characters.dart';
11
12 import 'keyword.dart' show
13 Keyword,
14 KeywordState;
15 import 'string_scanner.dart' show
16 StringScanner;
17 import 'token.dart';
18 import 'utf8_bytes_scanner.dart' show
19 Utf8BytesScanner;
20
6 21
7 abstract class Scanner { 22 abstract class Scanner {
8 Token tokenize(); 23 Token tokenize();
9 24
10 factory Scanner(SourceFile file, 25 factory Scanner(SourceFile file,
11 {bool includeComments: false}) { 26 {bool includeComments: false}) {
12 if (file is Utf8BytesSourceFile) { 27 if (file is Utf8BytesSourceFile) {
13 return new Utf8BytesScanner(file, includeComments: includeComments); 28 return new Utf8BytesScanner(file, includeComments: includeComments);
14 } else { 29 } else {
15 return new StringScanner(file, includeComments: includeComments); 30 return new StringScanner(file, includeComments: includeComments);
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 1177
1163 PrecedenceInfo closeBraceInfoFor(BeginGroupToken begin) { 1178 PrecedenceInfo closeBraceInfoFor(BeginGroupToken begin) {
1164 return const { 1179 return const {
1165 '(': CLOSE_PAREN_INFO, 1180 '(': CLOSE_PAREN_INFO,
1166 '[': CLOSE_SQUARE_BRACKET_INFO, 1181 '[': CLOSE_SQUARE_BRACKET_INFO,
1167 '{': CLOSE_CURLY_BRACKET_INFO, 1182 '{': CLOSE_CURLY_BRACKET_INFO,
1168 '<': GT_INFO, 1183 '<': GT_INFO,
1169 r'${': CLOSE_CURLY_BRACKET_INFO, 1184 r'${': CLOSE_CURLY_BRACKET_INFO,
1170 }[begin.value]; 1185 }[begin.value];
1171 } 1186 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/scanner/partial_parser.dart ('k') | pkg/compiler/lib/src/scanner/scanner_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698