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

Side by Side Diff: pkg/front_end/test/src/base/libraries_reader_test.dart

Issue 2784363002: flag to enable fasta scanner in analyzer (Closed)
Patch Set: rebase Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « pkg/front_end/test/scanner_test.dart ('k') | pkg/front_end/tool/perf.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/front_end/test/scanner_test.dart ('k') | pkg/front_end/tool/perf.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698