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

Unified Diff: pkg/compiler/lib/src/parser/element_listener.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/compiler/lib/src/parser/element_listener.dart
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart
index f7d9b410ed9e2ab0a178c441dfc95228a88807c2..ff466817cdc153e61a0122067f37ae67a9ea3692 100644
--- a/pkg/compiler/lib/src/parser/element_listener.dart
+++ b/pkg/compiler/lib/src/parser/element_listener.dart
@@ -550,30 +550,30 @@ class ElementListener extends Listener {
reportErrorFromToken(
token,
MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD,
- {'keyword': token.value});
+ {'keyword': token.lexeme});
} else if (token is ErrorToken) {
// TODO(ahe): This is dead code.
return synthesizeIdentifier(token);
} else {
reportFatalError(reporter.spanFromToken(token),
- "Expected identifier, but got '${token.value}'.");
+ "Expected identifier, but got '${token.lexeme}'.");
}
return token;
case ErrorKind.ExpectedType:
reportFatalError(reporter.spanFromToken(token),
- "Expected a type, but got '${token.value}'.");
+ "Expected a type, but got '${token.lexeme}'.");
return null;
case ErrorKind.ExpectedExpression:
reportFatalError(reporter.spanFromToken(token),
- "Expected an expression, but got '${token.value}'.");
+ "Expected an expression, but got '${token.lexeme}'.");
return null;
case ErrorKind.UnexpectedToken:
- String message = "Unexpected token '${token.value}'.";
+ String message = "Unexpected token '${token.lexeme}'.";
if (token.info == Precedence.BAD_INPUT_INFO) {
- message = token.value;
+ message = token.lexeme;
}
reportFatalError(reporter.spanFromToken(token), message);
return null;
@@ -592,19 +592,19 @@ class ElementListener extends Listener {
return native.handleNativeFunctionBody(this, token);
} else {
reportFatalError(reporter.spanFromToken(token),
- "Expected a function body, but got '${token.value}'.");
+ "Expected a function body, but got '${token.lexeme}'.");
}
return null;
case ErrorKind.ExpectedClassBodyToSkip:
case ErrorKind.ExpectedClassBody:
reportFatalError(reporter.spanFromToken(token),
- "Expected a class body, but got '${token.value}'.");
+ "Expected a class body, but got '${token.lexeme}'.");
return null;
case ErrorKind.ExpectedDeclaration:
reportFatalError(reporter.spanFromToken(token),
- "Expected a declaration, but got '${token.value}'.");
+ "Expected a declaration, but got '${token.lexeme}'.");
return null;
case ErrorKind.UnmatchedToken:
@@ -638,7 +638,7 @@ class ElementListener extends Listener {
case ErrorKind.ExpectedString:
reportFatalError(reporter.spanFromToken(token),
- "Expected a String, but got '${token.value}'.");
+ "Expected a String, but got '${token.lexeme}'.");
return null;
case ErrorKind.ExtraneousModifier:
@@ -849,7 +849,7 @@ class ElementListener extends Listener {
@override
void beginLiteralString(Token token) {
- String source = token.value;
+ String source = token.lexeme;
StringQuoting quoting = StringValidator.quotingFromString(source);
pushQuoting(quoting);
// Just wrap the token for now. At the end of the interpolation,

Powered by Google App Engine
This is Rietveld 408576698