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

Unified Diff: dart/frog/leg/scanner/scanner_task.dart

Issue 9129015: Diagnose unterminated "grouping" characters. (Closed) Base URL: ssh://aaricia.aar/home/ahe/Dart/all/dart.googlecode.com.git@master
Patch Set: Update mini_parser Created 8 years, 11 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 | « dart/frog/leg/scanner/scanner.dart ('k') | dart/frog/leg/tools/mini_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/scanner/scanner_task.dart
diff --git a/dart/frog/leg/scanner/scanner_task.dart b/dart/frog/leg/scanner/scanner_task.dart
index 27ee7bf82745882fbd07d5a1c5d45737336897f1..a15056d515e8aa17d20ba154eb17c66e4e533227 100644
--- a/dart/frog/leg/scanner/scanner_task.dart
+++ b/dart/frog/leg/scanner/scanner_task.dart
@@ -29,14 +29,13 @@ class ScannerTask extends CompilerTask {
} catch (MalformedInputException ex) {
Token token;
var message;
- if (ex.message is int) {
- token = new Token(EOF_INFO, ex.message);
- message = 'unexpected character';
+ if (ex.position is num) {
+ // TODO(ahe): Always use tokens in MalformedInputException.
+ token = new Token(EOF_INFO, ex.position);
} else {
- token = new Token(EOF_INFO, 0);
- message = ex.message;
+ token = ex.position;
}
- compiler.cancel(message, token: token);
+ compiler.cancel(ex.message, token: token);
}
ElementListener listener = new ElementListener(compiler, compilationUnit);
PartialParser parser = new PartialParser(listener);
« no previous file with comments | « dart/frog/leg/scanner/scanner.dart ('k') | dart/frog/leg/tools/mini_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698