OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:analyzer/error/listener.dart'; | 5 import 'package:analyzer/error/listener.dart'; |
6 import 'package:analyzer/src/generated/parser.dart'; | 6 import 'package:analyzer/src/generated/parser.dart'; |
7 import 'package:analyzer/src/summary/summarize_ast.dart'; | 7 import 'package:analyzer/src/summary/summarize_ast.dart'; |
8 import 'package:front_end/src/base/library_info.dart'; | 8 import 'package:front_end/src/base/library_info.dart'; |
9 import 'package:front_end/src/libraries_reader.dart'; | 9 import 'package:front_end/src/libraries_reader.dart'; |
10 import 'package:front_end/src/scanner/errors.dart'; | 10 import 'package:front_end/src/scanner/errors.dart'; |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 LibraryInfo _computeSingleInfo(String text, | 220 LibraryInfo _computeSingleInfo(String text, |
221 {String additionalDeclarations: ''}) { | 221 {String additionalDeclarations: ''}) { |
222 var libraries = _computeLibraries( | 222 var libraries = _computeLibraries( |
223 'const Map<String, LibraryInfo> libraries = const { "x": $text };', | 223 'const Map<String, LibraryInfo> libraries = const { "x": $text };', |
224 additionalDeclarations: additionalDeclarations); | 224 additionalDeclarations: additionalDeclarations); |
225 return libraries['x']; | 225 return libraries['x']; |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 class _Scanner extends Scanner { | 229 class _Scanner extends Scanner { |
230 _Scanner(String contents) : super(new CharSequenceReader(contents)) { | 230 _Scanner(String contents) : super.create(new CharSequenceReader(contents)) { |
231 preserveComments = false; | 231 preserveComments = false; |
232 } | 232 } |
233 | 233 |
234 @override | 234 @override |
235 void reportError( | 235 void reportError( |
236 ScannerErrorCode errorCode, int offset, List<Object> arguments) { | 236 ScannerErrorCode errorCode, int offset, List<Object> arguments) { |
237 fail('Unexpected error($errorCode, $offset, $arguments)'); | 237 fail('Unexpected error($errorCode, $offset, $arguments)'); |
238 } | 238 } |
239 } | 239 } |
OLD | NEW |