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

Unified Diff: pkg/front_end/lib/src/fasta/parser/parser.dart

Issue 2738313002: rename fasta.Token.value --> lexeme (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/parser/parser.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index d685aa4e13e00f7f966a4321840153d5e0e9a38d..457381a60039bfe7a77e652cb93bd374a525ae59 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -2690,7 +2690,7 @@ class Parser {
(identical(kind, FUNCTION_TOKEN) ||
identical(kind, OPEN_CURLY_BRACKET_TOKEN) ||
(identical(kind, KEYWORD_TOKEN) &&
- (nextToken.value == 'async' || nextToken.value == 'sync')))) {
+ (nextToken.lexeme == 'async' || nextToken.lexeme == 'sync')))) {
listener.handleNoTypeVariables(token);
return parseUnnamedFunction(token);
} else {
@@ -2809,7 +2809,7 @@ class Parser {
if (identical(kind, FUNCTION_TOKEN) ||
identical(kind, OPEN_CURLY_BRACKET_TOKEN) ||
(identical(kind, KEYWORD_TOKEN) &&
- (nextToken.value == 'async' || nextToken.value == 'sync'))) {
+ (nextToken.lexeme == 'async' || nextToken.lexeme == 'sync'))) {
return parseUnnamedFunction(token);
}
// Fall through.
@@ -3529,7 +3529,7 @@ class Parser {
next = reportErrorToken(token, false);
} else {
arguments ??= {};
- arguments.putIfAbsent("actual", () => token.value);
+ arguments.putIfAbsent("actual", () => token.lexeme);
next = listener.handleUnrecoverableError(token, kind, arguments);
}
return next ?? skipToEof(token);
@@ -3565,7 +3565,7 @@ class Parser {
break;
case ErrorKind.UnmatchedToken:
- String begin = token.begin.value;
+ String begin = token.begin.lexeme;
String end = closeBraceFor(begin);
arguments = {'begin': begin, 'end': end};
break;

Powered by Google App Engine
This is Rietveld 408576698