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

Unified Diff: pkg/analyzer_experimental/example/parser_driver.dart

Issue 45573002: Rename analyzer_experimental to analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks before publishing. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
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
deleted file mode 100644
index 4542018f595201ccd1be4389b36c4642fd64e0b7..0000000000000000000000000000000000000000
--- a/pkg/analyzer_experimental/example/parser_driver.dart
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env dart
-
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// 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 'dart:io';
-
-import 'package:analyzer_experimental/src/generated/java_core.dart' show CharSequence;
-import 'package:analyzer_experimental/src/generated/ast.dart';
-import 'package:analyzer_experimental/src/generated/error.dart';
-import 'package:analyzer_experimental/src/generated/parser.dart';
-import 'package:analyzer_experimental/src/generated/scanner.dart';
-
-
-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) {
- var src = file.readAsStringSync();
- var errorListener = new _ErrorCollector();
- var reader = new CharSequenceReader(new CharSequence(src));
- var scanner = new Scanner(null, reader, errorListener);
- 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);
- }
-}
-
-class _ErrorCollector extends AnalysisErrorListener {
- List<AnalysisError> errors;
- _ErrorCollector() : errors = new List<AnalysisError>();
- onError(error) => errors.add(error);
-}
-
-class _ASTVisitor extends GeneralizingASTVisitor {
- visitNode(ASTNode node) {
- print('${node.runtimeType} : <"${node.toString()}">');
- return super.visitNode(node);
- }
-}
-
« no previous file with comments | « pkg/analyzer_experimental/bin/formatter.dart ('k') | pkg/analyzer_experimental/example/resolver_driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698