| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library('parser'); | 5 #library('parser'); |
| 6 | 6 |
| 7 #import('dart:io'); | 7 #import('dart:io'); |
| 8 #import('dart:scalarlist'); | 8 #import('dart:scalarlist'); |
| 9 | 9 |
| 10 #import('../../../utf/utf.dart'); | 10 #import('../../../utf/utf.dart'); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 throw; | 107 throw; |
| 108 } else { | 108 } else { |
| 109 print(ex); | 109 print(ex); |
| 110 } | 110 } |
| 111 } catch (ex) { | 111 } catch (ex) { |
| 112 print('Error in file: $filename'); | 112 print('Error in file: $filename'); |
| 113 throw; | 113 throw; |
| 114 } | 114 } |
| 115 if (options.buildAst) { | 115 if (options.buildAst) { |
| 116 MyNodeListener l = listener; | 116 MyNodeListener l = listener; |
| 117 if (!l.nodes.isEmpty()) { | 117 if (!l.nodes.isEmpty) { |
| 118 String message = 'Stack not empty after parsing'; | 118 String message = 'Stack not empty after parsing'; |
| 119 print(formatError(message, l.nodes.head.getBeginToken(), | 119 print(formatError(message, l.nodes.head.getBeginToken(), |
| 120 l.nodes.head.getEndToken(), file)); | 120 l.nodes.head.getEndToken(), file)); |
| 121 throw message; | 121 throw message; |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 Token scan(MySourceFile source) { | 126 Token scan(MySourceFile source) { |
| 127 Scanner scanner = new ByteArrayScanner(source.rawText); | 127 Scanner scanner = new ByteArrayScanner(source.rawText); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 set text(String newText) { | 312 set text(String newText) { |
| 313 throw "not supported"; | 313 throw "not supported"; |
| 314 } | 314 } |
| 315 } | 315 } |
| 316 | 316 |
| 317 class Mock { | 317 class Mock { |
| 318 const Mock(); | 318 const Mock(); |
| 319 bool get useColors => true; | 319 bool get useColors => true; |
| 320 internalError(message) { throw message.toString(); } | 320 internalError(message) { throw message.toString(); } |
| 321 } | 321 } |
| OLD | NEW |