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

Unified Diff: pkg/analyzer/lib/src/generated/parser.dart

Issue 1059263004: Fix ill-formatted error messages in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_core.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 6c782fa809cee5281d8f736e5f307b183ba0efc0..50db79161cab990df939a00c2bdc7c6078ea3810 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -4243,7 +4243,8 @@ class Parser {
} else if (_matches(TokenType.PERIOD) ||
_matches(TokenType.QUESTION_PERIOD)) {
if (_matches(TokenType.QUESTION_PERIOD) && !allowConditional) {
- _reportErrorForCurrentToken(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER);
+ _reportErrorForCurrentToken(
+ ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, [_currentToken.lexeme]);
}
Token operator = getAndAdvance();
return new PropertyAccess(prefix, operator, parseSimpleIdentifier());
@@ -5678,8 +5679,9 @@ class Parser {
}
Token functionDefinition = getAndAdvance();
if (_matchesKeyword(Keyword.RETURN)) {
- _reportErrorForToken(
- ParserErrorCode.UNEXPECTED_TOKEN, getAndAdvance());
+ _reportErrorForToken(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken,
+ [_currentToken.lexeme]);
+ _advance();
}
Expression expression = parseExpression2();
Token semicolon = null;
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_core.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698