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

Side by Side Diff: pkg/front_end/lib/src/dependency_grapher_impl.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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/error/listener.dart'; 8 import 'package:analyzer/error/listener.dart';
9 import 'package:analyzer/src/dart/scanner/reader.dart'; 9 import 'package:analyzer/src/dart/scanner/reader.dart';
10 import 'package:analyzer/src/generated/parser.dart'; 10 import 'package:analyzer/src/generated/parser.dart';
(...skipping 23 matching lines...) Expand all
34 var startingPoint = new _StartingPoint(walker, sources); 34 var startingPoint = new _StartingPoint(walker, sources);
35 await walker.walk(startingPoint); 35 await walker.walk(startingPoint);
36 return walker.graph; 36 return walker.graph;
37 } 37 }
38 38
39 /// Type of the callback function used by [graphForProgram] to read file 39 /// Type of the callback function used by [graphForProgram] to read file
40 /// contents. 40 /// contents.
41 typedef Future<String> FileReader(Uri originalUri, Uri resolvedUri); 41 typedef Future<String> FileReader(Uri originalUri, Uri resolvedUri);
42 42
43 class _Scanner extends Scanner { 43 class _Scanner extends Scanner {
44 _Scanner(String contents) : super(new CharSequenceReader(contents)) { 44 _Scanner(String contents) : super.create(new CharSequenceReader(contents)) {
45 preserveComments = false; 45 preserveComments = false;
46 } 46 }
47 47
48 @override 48 @override
49 void reportError(errorCode, int offset, List<Object> arguments) { 49 void reportError(errorCode, int offset, List<Object> arguments) {
50 // TODO(paulberry): report errors. 50 // TODO(paulberry): report errors.
51 } 51 }
52 } 52 }
53 53
54 class _StartingPoint extends _WalkerNode { 54 class _StartingPoint extends _WalkerNode {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 handleDependency(referencedUri); 142 handleDependency(referencedUri);
143 } 143 }
144 } 144 }
145 } 145 }
146 if (!coreUriFound) { 146 if (!coreUriFound) {
147 handleDependency(dartCoreUri); 147 handleDependency(dartCoreUri);
148 } 148 }
149 return dependencies; 149 return dependencies;
150 } 150 }
151 } 151 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/scanner/scanner.dart ('k') | pkg/front_end/lib/src/scanner/reader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698