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

Unified Diff: sdk/lib/_internal/compiler/implementation/scanner/listener.dart

Issue 340703003: Prevent double reporting on hex, strings, and multiline comments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments and comments Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/scanner/listener.dart
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
index 22596d4ea39f08876fb9f940fd2bad4aa477a743..b90d9fd6bee1a112abf3f28c6dd910d3f3432bf2 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
@@ -634,13 +634,13 @@ class Listener {
return skipToEof(token);
}
- Link<Token> expectedDeclaration(Token token) {
+ Token expectedDeclaration(Token token) {
if (token is ErrorToken) {
reportErrorToken(token);
} else {
error("expected a declaration, but got '${token.value}'", token);
}
- return const Link<Token>();
+ return skipToEof(token);
}
Token unmatched(Token token) {
@@ -1213,14 +1213,14 @@ class ElementListener extends Listener {
return unexpected(token);
}
- Link<Token> expectedDeclaration(Token token) {
+ Token expectedDeclaration(Token token) {
if (token is ErrorToken) {
reportErrorToken(token);
} else {
reportFatalError(token,
"Expected a declaration, but got '${token.value}'.");
}
- return const Link<Token>();
+ return skipToEof(token);
}
Token unmatched(Token token) {
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698