Index: pkg/analyzer_experimental/example/parser_driver.dart |
diff --git a/pkg/analyzer-experimental/example/parser_driver.dart b/pkg/analyzer_experimental/example/parser_driver.dart |
similarity index 79% |
rename from pkg/analyzer-experimental/example/parser_driver.dart |
rename to pkg/analyzer_experimental/example/parser_driver.dart |
index 061a0555f1bde9c77ccc00a3b526810ea5fa6338..8501552a7ce20948a84d96a7f0b5453fa4e869b4 100644 |
--- a/pkg/analyzer-experimental/example/parser_driver.dart |
+++ b/pkg/analyzer_experimental/example/parser_driver.dart |
@@ -4,29 +4,29 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-import 'package:analyzer-experimental/src/generated/ast.dart'; |
-import 'package:analyzer-experimental/src/generated/error.dart'; |
-import 'package:analyzer-experimental/src/generated/java_core.dart'; |
-import 'package:analyzer-experimental/src/generated/parser.dart'; |
-import 'package:analyzer-experimental/src/generated/scanner.dart'; |
+import 'package:analyzer_experimental/src/generated/ast.dart'; |
+import 'package:analyzer_experimental/src/generated/error.dart'; |
+import 'package:analyzer_experimental/src/generated/java_core.dart'; |
+import 'package:analyzer_experimental/src/generated/parser.dart'; |
+import 'package:analyzer_experimental/src/generated/scanner.dart'; |
import 'dart:io'; |
main() { |
- |
+ |
print('working dir ${new File('.').fullPathSync()}'); |
- |
+ |
var args = new Options().arguments; |
if (args.length == 0) { |
print('Usage: parser_driver [files_to_parse]'); |
exit(0); |
} |
- |
+ |
for (var arg in args) { |
_parse(new File(arg)); |
} |
- |
+ |
} |
_parse(File file) { |
@@ -36,10 +36,10 @@ _parse(File file) { |
var token = scanner.tokenize(); |
var parser = new Parser(null, errorListener); |
var unit = parser.parseCompilationUnit(token); |
- |
+ |
var visitor = new _ASTVisitor(); |
unit.accept(visitor); |
- |
+ |
for (var error in errorListener.errors) { |
print(error); |
} |