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

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

Issue 1749143003: Add @overrides to (a lot of) analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: options Created 4 years, 9 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
« no previous file with comments | « pkg/analyzer/.analysis_options ('k') | pkg/analyzer/example/resolver_driver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'; 10 import 'package:analyzer/src/dart/scanner/reader.dart';
(...skipping 25 matching lines...) Expand all
36 36
37 var visitor = new _ASTVisitor(); 37 var visitor = new _ASTVisitor();
38 unit.accept(visitor); 38 unit.accept(visitor);
39 39
40 for (var error in errorListener.errors) { 40 for (var error in errorListener.errors) {
41 print(error); 41 print(error);
42 } 42 }
43 } 43 }
44 44
45 class _ASTVisitor extends GeneralizingAstVisitor { 45 class _ASTVisitor extends GeneralizingAstVisitor {
46 @override
46 visitNode(AstNode node) { 47 visitNode(AstNode node) {
47 print('${node.runtimeType} : <"$node">'); 48 print('${node.runtimeType} : <"$node">');
48 return super.visitNode(node); 49 return super.visitNode(node);
49 } 50 }
50 } 51 }
51 52
52 class _ErrorCollector extends AnalysisErrorListener { 53 class _ErrorCollector extends AnalysisErrorListener {
53 List<AnalysisError> errors; 54 List<AnalysisError> errors;
54 _ErrorCollector() : errors = new List<AnalysisError>(); 55 _ErrorCollector() : errors = new List<AnalysisError>();
56 @override
55 onError(error) => errors.add(error); 57 onError(error) => errors.add(error);
56 } 58 }
OLDNEW
« no previous file with comments | « pkg/analyzer/.analysis_options ('k') | pkg/analyzer/example/resolver_driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698