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

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: Created 6 years, 6 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: 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 5ee68c2747cace5452630c430dc89908d3478fe5..a4d50d18f258f389717d4a51b4b173b624b915c9 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
@@ -631,13 +631,13 @@ class Listener {
return skipToEof(token);
}
- Link<Token> expectedDeclaration(Token token) {
+ Token expectedDeclaration(Token token) {
ahe 2014/06/23 14:28:49 This makes more sense.
srawlins 2014/07/15 20:07:07 Ack.
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) {
@@ -1164,14 +1164,14 @@ class ElementListener extends Listener {
}
}
- 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) {

Powered by Google App Engine
This is Rietveld 408576698