| 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 | 10 |
| 10 /** | 11 /** |
| 11 * Compute the public namespace portion of the summary for the given [unit], | 12 * Compute the public namespace portion of the summary for the given [unit], |
| 12 * which is presumed to be an unresolved AST. | 13 * which is presumed to be an unresolved AST. |
| 13 */ | 14 */ |
| 14 UnlinkedPublicNamespaceBuilder computePublicNamespace(CompilationUnit unit) { | 15 UnlinkedPublicNamespaceBuilder computePublicNamespace(CompilationUnit unit) { |
| 15 _PublicNamespaceVisitor visitor = new _PublicNamespaceVisitor(); | 16 _PublicNamespaceVisitor visitor = new _PublicNamespaceVisitor(); |
| 16 unit.accept(visitor); | 17 unit.accept(visitor); |
| 17 return new UnlinkedPublicNamespaceBuilder( | 18 return new UnlinkedPublicNamespaceBuilder( |
| 18 names: visitor.names, exports: visitor.exports, parts: visitor.parts); | 19 names: visitor.names, exports: visitor.exports, parts: visitor.parts); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 152 |
| 152 @override | 153 @override |
| 153 visitVariableDeclaration(VariableDeclaration node) { | 154 visitVariableDeclaration(VariableDeclaration node) { |
| 154 String name = node.name.name; | 155 String name = node.name.name; |
| 155 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0); | 156 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0); |
| 156 if (!node.isFinal && !node.isConst) { | 157 if (!node.isFinal && !node.isConst) { |
| 157 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0); | 158 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0); |
| 158 } | 159 } |
| 159 } | 160 } |
| 160 } | 161 } |
| OLD | NEW |