| 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 4f6d2e88bfa203acd4d223bc387a59269d98d708..19a782e778a28104d3640ef7d6464710d812f24d 100644
|
| --- a/dart/lib/compiler/implementation/scanner/scanner_task.dart
|
| +++ b/dart/lib/compiler/implementation/scanner/scanner_task.dart
|
| @@ -91,19 +91,26 @@ class ScannerTask extends CompilerTask {
|
| Script script = compilationUnit.script;
|
| Token tokens;
|
| try {
|
| - tokens = new StringScanner(script.text).tokenize();
|
| - } catch (MalformedInputException 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;
|
| + try {
|
| + tokens = new StringScanner(script.text).tokenize();
|
| + } catch (MalformedInputException 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);
|
| }
|
| - compiler.cancel(ex.message, token: token);
|
| + compiler.dietParser.dietParse(compilationUnit, tokens);
|
| + } catch (CompilerCancelledException ex) {
|
| + throw;
|
| + } catch (var ex) {
|
| + compiler.unhandledExceptionOnElement(compilationUnit);
|
| + throw;
|
| }
|
| - compiler.dietParser.dietParse(compilationUnit, tokens);
|
| }
|
|
|
| LibraryElement loadLibrary(Uri uri, ScriptTag node) {
|
|
|