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

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

Issue 3004573002: remove old fasta missing exponent recovery (Closed)
Patch Set: Created 3 years, 4 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 | « no previous file | pkg/front_end/test/scanner_replacement_test.dart » ('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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 licenset hat can be found in the LICENSE file. 3 // BSD-style licenset hat can be found in the LICENSE file.
4 4
5 library fasta.scanner.recover; 5 library fasta.scanner.recover;
6 6
7 import '../../scanner/token.dart' show TokenType; 7 import '../../scanner/token.dart' show TokenType;
8 8
9 import '../fasta_codes.dart' 9 import '../fasta_codes.dart'
10 show 10 show
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 if (append) { 121 if (append) {
122 codeUnits.addAll(next.lexeme.codeUnits); 122 codeUnits.addAll(next.lexeme.codeUnits);
123 next = next.next; 123 next = next.next;
124 } 124 }
125 String value = new String.fromCharCodes(codeUnits); 125 String value = new String.fromCharCodes(codeUnits);
126 return synthesizeToken(charOffset, value, TokenType.IDENTIFIER) 126 return synthesizeToken(charOffset, value, TokenType.IDENTIFIER)
127 ..next = next; 127 ..next = next;
128 } 128 }
129 129
130 recoverExponent() { 130 recoverExponent() {
131 return synthesizeToken(errorTail.charOffset, "NaN", TokenType.DOUBLE) 131 return errorTail.next;
132 ..next = errorTail.next;
133 } 132 }
134 133
135 recoverString() { 134 recoverString() {
136 return errorTail.next; 135 return errorTail.next;
137 } 136 }
138 137
139 recoverHexDigit() { 138 recoverHexDigit() {
140 return synthesizeToken(errorTail.charOffset, "0", TokenType.INT) 139 return synthesizeToken(errorTail.charOffset, "0", TokenType.INT)
141 ..next = errorTail.next; 140 ..next = errorTail.next;
142 } 141 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 237
239 String closeBraceFor(String openBrace) { 238 String closeBraceFor(String openBrace) {
240 return const { 239 return const {
241 '(': ')', 240 '(': ')',
242 '[': ']', 241 '[': ']',
243 '{': '}', 242 '{': '}',
244 '<': '>', 243 '<': '>',
245 r'${': '}', 244 r'${': '}',
246 }[openBrace]; 245 }[openBrace];
247 } 246 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/test/scanner_replacement_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698