| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 257 } |
| 258 | 258 |
| 259 class MyCanceller implements DiagnosticListener { | 259 class MyCanceller implements DiagnosticListener { |
| 260 final SourceFile file; | 260 final SourceFile file; |
| 261 final MyOptions options; | 261 final MyOptions options; |
| 262 | 262 |
| 263 MyCanceller(this.file, this.options); | 263 MyCanceller(this.file, this.options); |
| 264 | 264 |
| 265 void log(String message) {} | 265 void log(String message) {} |
| 266 | 266 |
| 267 void cancel([String reason, node, token, instruction, element]) { | 267 void cancel(String reason, {node, token, instruction, element}) { |
| 268 Token beginToken; | 268 Token beginToken; |
| 269 Token endToken; | 269 Token endToken; |
| 270 if (token !== null) { | 270 if (token !== null) { |
| 271 beginToken = token; | 271 beginToken = token; |
| 272 endToken = token; | 272 endToken = token; |
| 273 } else if (node !== null) { | 273 } else if (node !== null) { |
| 274 beginToken = node.getBeginToken(); | 274 beginToken = node.getBeginToken(); |
| 275 endToken = node.getEndToken(); | 275 endToken = node.getEndToken(); |
| 276 } | 276 } |
| 277 String message = formatError(reason, beginToken, endToken, file); | 277 String message = formatError(reason, beginToken, endToken, file); |
| (...skipping 34 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 |