| OLD | NEW |
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 | 2 |
| 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
| 5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/ast.dart'; | 9 import 'package:analyzer/src/generated/ast.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 print(error); | 43 print(error); |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 class _ErrorCollector extends AnalysisErrorListener { | 47 class _ErrorCollector extends AnalysisErrorListener { |
| 48 List<AnalysisError> errors; | 48 List<AnalysisError> errors; |
| 49 _ErrorCollector() : errors = new List<AnalysisError>(); | 49 _ErrorCollector() : errors = new List<AnalysisError>(); |
| 50 onError(error) => errors.add(error); | 50 onError(error) => errors.add(error); |
| 51 } | 51 } |
| 52 | 52 |
| 53 class _ASTVisitor extends GeneralizingASTVisitor { | 53 class _ASTVisitor extends GeneralizingAstVisitor { |
| 54 visitNode(ASTNode node) { | 54 visitNode(AstNode node) { |
| 55 print('${node.runtimeType} : <"${node.toString()}">'); | 55 print('${node.runtimeType} : <"${node.toString()}">'); |
| 56 return super.visitNode(node); | 56 return super.visitNode(node); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| OLD | NEW |