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

Unified Diff: dart/lib/compiler/implementation/scanner/scanner_task.dart

Issue 10913176: Reject non-ASCII identifiers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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: dart/lib/compiler/implementation/scanner/scanner_task.dart
diff --git a/dart/lib/compiler/implementation/scanner/scanner_task.dart b/dart/lib/compiler/implementation/scanner/scanner_task.dart
index af1888549f87d72e3ebfc3c29a1a883aa641a56e..f9a9f3af21127bd0dad6631514947669dbe346df 100644
--- a/dart/lib/compiler/implementation/scanner/scanner_task.dart
+++ b/dart/lib/compiler/implementation/scanner/scanner_task.dart
@@ -112,20 +112,7 @@ class ScannerTask extends CompilerTask {
void scanElements(CompilationUnitElement compilationUnit) {
Script script = compilationUnit.script;
- Token tokens;
- try {
- tokens = new StringScanner(script.text).tokenize();
- } on MalformedInputException catch (ex) {
- Token token;
- var message;
- if (ex.position is num) {
- // TODO(ahe): Always use tokens in MalformedInputException.
- token = new Token(EOF_INFO, ex.position);
- } else {
- token = ex.position;
- }
- compiler.cancel(ex.message, token: token);
- }
+ Token tokens = new StringScanner(script.text).tokenize();
compiler.dietParser.dietParse(compilationUnit, tokens);
}
« no previous file with comments | « dart/lib/compiler/implementation/scanner/scanner.dart ('k') | dart/lib/compiler/implementation/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698