OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analyzer.src.summary.public_namespace_visitor; | 5 library analyzer.src.summary.public_namespace_visitor; |
6 | 6 |
7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
8 import 'package:analyzer/src/summary/format.dart'; | 8 import 'package:analyzer/src/summary/format.dart'; |
9 import 'package:analyzer/src/summary/idl.dart'; | 9 import 'package:analyzer/src/summary/idl.dart'; |
10 | 10 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 node.functionExpression.typeParameters?.typeParameters?.length ?? 0); | 170 node.functionExpression.typeParameters?.typeParameters?.length ?? 0); |
171 } | 171 } |
172 | 172 |
173 @override | 173 @override |
174 visitFunctionTypeAlias(FunctionTypeAlias node) { | 174 visitFunctionTypeAlias(FunctionTypeAlias node) { |
175 addNameIfPublic(node.name.name, ReferenceKind.typedef, | 175 addNameIfPublic(node.name.name, ReferenceKind.typedef, |
176 node.typeParameters?.typeParameters?.length ?? 0); | 176 node.typeParameters?.typeParameters?.length ?? 0); |
177 } | 177 } |
178 | 178 |
179 @override | 179 @override |
| 180 visitGenericTypeAlias(GenericTypeAlias node) { |
| 181 addNameIfPublic(node.name.name, ReferenceKind.genericFunctionTypedef, |
| 182 node.typeParameters?.typeParameters?.length ?? 0); |
| 183 } |
| 184 |
| 185 @override |
180 visitPartDirective(PartDirective node) { | 186 visitPartDirective(PartDirective node) { |
181 parts.add(node.uri.stringValue ?? ''); | 187 parts.add(node.uri.stringValue ?? ''); |
182 } | 188 } |
183 | 189 |
184 @override | 190 @override |
185 visitVariableDeclaration(VariableDeclaration node) { | 191 visitVariableDeclaration(VariableDeclaration node) { |
186 String name = node.name.name; | 192 String name = node.name.name; |
187 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0); | 193 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0); |
188 if (!node.isFinal && !node.isConst) { | 194 if (!node.isFinal && !node.isConst) { |
189 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0); | 195 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0); |
190 } | 196 } |
191 } | 197 } |
192 } | 198 } |
OLD | NEW |