| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 visitPartDirective(PartDirective node) { | 180 visitPartDirective(PartDirective node) { |
| 181 parts.add(node.uri.stringValue); | 181 parts.add(node.uri.stringValue ?? ''); |
| 182 } | 182 } |
| 183 | 183 |
| 184 @override | 184 @override |
| 185 visitVariableDeclaration(VariableDeclaration node) { | 185 visitVariableDeclaration(VariableDeclaration node) { |
| 186 String name = node.name.name; | 186 String name = node.name.name; |
| 187 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0); | 187 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0); |
| 188 if (!node.isFinal && !node.isConst) { | 188 if (!node.isFinal && !node.isConst) { |
| 189 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0); | 189 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0); |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 } | 192 } |
| OLD | NEW |