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

Side by Side Diff: pkg/analyzer/example/parser_driver.dart

Issue 1693083004: Move scanner out of generated and clean up imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: clean up Created 4 years, 10 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 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/dart/ast/visitor.dart'; 9 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/src/dart/scanner/reader.dart';
11 import 'package:analyzer/src/dart/scanner/scanner.dart';
10 import 'package:analyzer/src/generated/error.dart'; 12 import 'package:analyzer/src/generated/error.dart';
11 import 'package:analyzer/src/generated/parser.dart'; 13 import 'package:analyzer/src/generated/parser.dart';
12 import 'package:analyzer/src/generated/scanner.dart';
13 14
14 main(List<String> args) { 15 main(List<String> args) {
15 print('working dir ${new File('.').resolveSymbolicLinksSync()}'); 16 print('working dir ${new File('.').resolveSymbolicLinksSync()}');
16 17
17 if (args.length == 0) { 18 if (args.length == 0) {
18 print('Usage: parser_driver [files_to_parse]'); 19 print('Usage: parser_driver [files_to_parse]');
19 exit(0); 20 exit(0);
20 } 21 }
21 22
22 for (var arg in args) { 23 for (var arg in args) {
(...skipping 23 matching lines...) Expand all
46 print('${node.runtimeType} : <"$node">'); 47 print('${node.runtimeType} : <"$node">');
47 return super.visitNode(node); 48 return super.visitNode(node);
48 } 49 }
49 } 50 }
50 51
51 class _ErrorCollector extends AnalysisErrorListener { 52 class _ErrorCollector extends AnalysisErrorListener {
52 List<AnalysisError> errors; 53 List<AnalysisError> errors;
53 _ErrorCollector() : errors = new List<AnalysisError>(); 54 _ErrorCollector() : errors = new List<AnalysisError>();
54 onError(error) => errors.add(error); 55 onError(error) => errors.add(error);
55 } 56 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/stress/replay/replay.dart ('k') | pkg/analyzer/example/scanner_driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698