OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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/analysis/session.dart'; | 7 import 'package:analyzer/dart/analysis/session.dart'; |
8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
10 import 'package:analyzer/dart/element/visitor.dart'; | 10 import 'package:analyzer/dart/element/visitor.dart'; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 /** | 61 /** |
62 * Return `true` if strong mode should be enabled for this test. | 62 * Return `true` if strong mode should be enabled for this test. |
63 */ | 63 */ |
64 bool get enableStrongMode => false; | 64 bool get enableStrongMode => false; |
65 | 65 |
66 /** | 66 /** |
67 * Return the analysis session associated with the driver. | 67 * Return the analysis session associated with the driver. |
68 */ | 68 */ |
69 AnalysisSession get session => driver.currentSession; | 69 AnalysisSession get session => driver.currentSession; |
70 | 70 |
71 Source addMetaPackageSource() => addPackageSource( | 71 Source addMetaPackageSource() => addPackageSource('meta', 'meta.dart', r''' |
72 'meta', | |
73 'meta.dart', | |
74 r''' | |
75 library meta; | 72 library meta; |
76 | 73 |
77 const Required required = const Required(); | 74 const Required required = const Required(); |
78 | 75 |
79 class Required { | 76 class Required { |
80 final String reason; | 77 final String reason; |
81 const Required([this.reason]); | 78 const Required([this.reason]); |
82 } | 79 } |
83 '''); | 80 '''); |
84 | 81 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 final _ElementVisitorFunction function; | 185 final _ElementVisitorFunction function; |
189 | 186 |
190 _ElementVisitorFunctionWrapper(this.function); | 187 _ElementVisitorFunctionWrapper(this.function); |
191 | 188 |
192 @override | 189 @override |
193 visitElement(Element element) { | 190 visitElement(Element element) { |
194 function(element); | 191 function(element); |
195 super.visitElement(element); | 192 super.visitElement(element); |
196 } | 193 } |
197 } | 194 } |
OLD | NEW |