| 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 06f2bc1ae62aba0d83301df609cc159470b9b0c6..be504f68da6e122903ec4fa7309d2ce4a9141a7b 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 newSyntheticToken(synthesizeIdentifier(token));
|
| } else {
|
| reportFatalError(reporter.spanFromToken(token),
|
| - "Expected identifier, but got '${token.value}'.");
|
| + "Expected identifier, but got '${token.lexeme}'.");
|
| }
|
| return newSyntheticToken(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;
|
| @@ -593,19 +593,19 @@ class ElementListener extends Listener {
|
| 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:
|
| @@ -639,7 +639,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:
|
| @@ -850,7 +850,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,
|
|
|