OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 | 6 |
7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
9 import 'package:analyzer/dart/element/visitor.dart'; | 9 import 'package:analyzer/dart/element/visitor.dart'; |
10 import 'package:analyzer/exception/exception.dart'; | 10 import 'package:analyzer/exception/exception.dart'; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 DartSdk sdk; | 49 DartSdk sdk; |
50 Map<String, List<Folder>> packageMap; | 50 Map<String, List<Folder>> packageMap; |
51 UriResolver resourceResolver; | 51 UriResolver resourceResolver; |
52 | 52 |
53 StringBuffer _logBuffer = new StringBuffer(); | 53 StringBuffer _logBuffer = new StringBuffer(); |
54 FileContentOverlay _fileContentOverlay = new FileContentOverlay(); | 54 FileContentOverlay _fileContentOverlay = new FileContentOverlay(); |
55 AnalysisDriver _driver; | 55 AnalysisDriver _driver; |
56 | 56 |
57 AnalysisDriver get driver => _driver; | 57 AnalysisDriver get driver => _driver; |
58 | 58 |
59 Source addMetaPackageSource() => addPackageSource( | 59 Source addMetaPackageSource() => addPackageSource('meta', 'meta.dart', r''' |
60 'meta', | |
61 'meta.dart', | |
62 r''' | |
63 library meta; | 60 library meta; |
64 | 61 |
65 const Required required = const Required(); | 62 const Required required = const Required(); |
66 | 63 |
67 class Required { | 64 class Required { |
68 final String reason; | 65 final String reason; |
69 const Required([this.reason]); | 66 const Required([this.reason]); |
70 } | 67 } |
71 '''); | 68 '''); |
72 | 69 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 * [engine.GeneralizingElementVisitor]. | 163 * [engine.GeneralizingElementVisitor]. |
167 */ | 164 */ |
168 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { | 165 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { |
169 final _ElementVisitorFunction function; | 166 final _ElementVisitorFunction function; |
170 _ElementVisitorFunctionWrapper(this.function); | 167 _ElementVisitorFunctionWrapper(this.function); |
171 visitElement(Element element) { | 168 visitElement(Element element) { |
172 function(element); | 169 function(element); |
173 super.visitElement(element); | 170 super.visitElement(element); |
174 } | 171 } |
175 } | 172 } |
OLD | NEW |