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

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

Issue 2948473002: integrating fasta parser (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 'package:charcode/ascii.dart'; 5 import 'package:charcode/ascii.dart';
6 import 'package:front_end/src/scanner/errors.dart'; 6 import 'package:front_end/src/scanner/errors.dart';
7 import 'package:front_end/src/scanner/reader.dart'; 7 import 'package:front_end/src/scanner/reader.dart';
8 import 'package:front_end/src/scanner/string_utilities.dart'; 8 import 'package:front_end/src/scanner/string_utilities.dart';
9 import 'package:front_end/src/scanner/token.dart'; 9 import 'package:front_end/src/scanner/token.dart';
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 * 119 *
120 * The lexical structure of Dart is ambiguous without knowledge of the context 120 * The lexical structure of Dart is ambiguous without knowledge of the context
121 * in which a token is being scanned. For example, without context we cannot 121 * in which a token is being scanned. For example, without context we cannot
122 * determine whether source of the form "<<" should be scanned as a single 122 * determine whether source of the form "<<" should be scanned as a single
123 * left-shift operator or as two left angle brackets. This scanner does not have 123 * left-shift operator or as two left angle brackets. This scanner does not have
124 * any context, so it always resolves such conflicts by scanning the longest 124 * any context, so it always resolves such conflicts by scanning the longest
125 * possible token. 125 * possible token.
126 */ 126 */
127 abstract class Scanner { 127 abstract class Scanner {
128 /** 128 /**
129 * A flag indicating whether the [Scanner] factory method 129 * A flag indicating whether the analyzer [Scanner] factory method
130 * will return a fasta based scanner or an analyzer based scanner. 130 * will return a fasta based scanner or an analyzer based scanner.
131 */ 131 */
132 static bool useFasta = const bool.fromEnvironment("useFastaScanner"); 132 static bool useFasta = const bool.fromEnvironment("useFastaScanner");
133 133
134 /** 134 /**
135 * The reader used to access the characters in the source. 135 * The reader used to access the characters in the source.
136 */ 136 */
137 final CharacterReader _reader; 137 final CharacterReader _reader;
138 138
139 /** 139 /**
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 } 1334 }
1335 1335
1336 /** 1336 /**
1337 * Checks if [value] is a single-line or multi-line comment. 1337 * Checks if [value] is a single-line or multi-line comment.
1338 */ 1338 */
1339 static bool _isDocumentationComment(String value) { 1339 static bool _isDocumentationComment(String value) {
1340 return StringUtilities.startsWith3(value, 0, $slash, $slash, $slash) || 1340 return StringUtilities.startsWith3(value, 0, $slash, $slash, $slash) ||
1341 StringUtilities.startsWith3(value, 0, $slash, $asterisk, $asterisk); 1341 StringUtilities.startsWith3(value, 0, $slash, $asterisk, $asterisk);
1342 } 1342 }
1343 } 1343 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698