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

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

Issue 2738313002: rename fasta.Token.value --> lexeme (Closed)
Patch Set: merge Created 3 years, 9 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 library fasta.scanner.abstract_scanner; 5 library fasta.scanner.abstract_scanner;
6 6
7 import 'dart:collection' show ListMixin; 7 import 'dart:collection' show ListMixin;
8 8
9 import 'dart:typed_data' show Uint16List, Uint32List; 9 import 'dart:typed_data' show Uint16List, Uint32List;
10 10
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 } 1166 }
1167 } 1167 }
1168 1168
1169 PrecedenceInfo closeBraceInfoFor(BeginGroupToken begin) { 1169 PrecedenceInfo closeBraceInfoFor(BeginGroupToken begin) {
1170 return const { 1170 return const {
1171 '(': CLOSE_PAREN_INFO, 1171 '(': CLOSE_PAREN_INFO,
1172 '[': CLOSE_SQUARE_BRACKET_INFO, 1172 '[': CLOSE_SQUARE_BRACKET_INFO,
1173 '{': CLOSE_CURLY_BRACKET_INFO, 1173 '{': CLOSE_CURLY_BRACKET_INFO,
1174 '<': GT_INFO, 1174 '<': GT_INFO,
1175 r'${': CLOSE_CURLY_BRACKET_INFO, 1175 r'${': CLOSE_CURLY_BRACKET_INFO,
1176 }[begin.value]; 1176 }[begin.lexeme];
1177 } 1177 }
1178 1178
1179 class LineStarts extends Object with ListMixin<int> { 1179 class LineStarts extends Object with ListMixin<int> {
1180 List<int> array; 1180 List<int> array;
1181 int arrayLength = 0; 1181 int arrayLength = 0;
1182 1182
1183 LineStarts(int numberOfBytesHint) { 1183 LineStarts(int numberOfBytesHint) {
1184 // Let's assume the average Dart file is 300 bytes. 1184 // Let's assume the average Dart file is 300 bytes.
1185 if (numberOfBytesHint == null) numberOfBytesHint = 300; 1185 if (numberOfBytesHint == null) numberOfBytesHint = 300;
1186 1186
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 switchToUint32(newLength); 1245 switchToUint32(newLength);
1246 } 1246 }
1247 } 1247 }
1248 1248
1249 void switchToUint32(int newLength) { 1249 void switchToUint32(int newLength) {
1250 final newArray = new Uint32List(newLength); 1250 final newArray = new Uint32List(newLength);
1251 newArray.setRange(0, arrayLength, array); 1251 newArray.setRange(0, arrayLength, array);
1252 array = newArray; 1252 array = newArray;
1253 } 1253 }
1254 } 1254 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser_main.dart ('k') | pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698