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

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

Issue 2967363003: enable fasta scanner in analyzer by default (Closed)
Patch Set: Created 3 years, 5 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/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | pkg/front_end/messages.yaml » ('j') | 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 analyzer [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 =
133 const bool.fromEnvironment("useFastaScanner", defaultValue: true);
133 134
134 /** 135 /**
135 * The reader used to access the characters in the source. 136 * The reader used to access the characters in the source.
136 */ 137 */
137 final CharacterReader _reader; 138 final CharacterReader _reader;
138 139
139 /** 140 /**
140 * The flag specifying whether documentation comments should be parsed. 141 * The flag specifying whether documentation comments should be parsed.
141 */ 142 */
142 bool _preserveComments = true; 143 bool _preserveComments = true;
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 } 1335 }
1335 1336
1336 /** 1337 /**
1337 * Checks if [value] is a single-line or multi-line comment. 1338 * Checks if [value] is a single-line or multi-line comment.
1338 */ 1339 */
1339 static bool _isDocumentationComment(String value) { 1340 static bool _isDocumentationComment(String value) {
1340 return StringUtilities.startsWith3(value, 0, $slash, $slash, $slash) || 1341 return StringUtilities.startsWith3(value, 0, $slash, $slash, $slash) ||
1341 StringUtilities.startsWith3(value, 0, $slash, $asterisk, $asterisk); 1342 StringUtilities.startsWith3(value, 0, $slash, $asterisk, $asterisk);
1342 } 1343 }
1343 } 1344 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698