| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 serialization.summarize_ast; | 5 library serialization.summarize_ast; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/visitor.dart'; | 8 import 'package:analyzer/dart/ast/visitor.dart'; |
| 9 import 'package:analyzer/src/generated/scanner.dart'; | 9 import 'package:analyzer/src/generated/scanner.dart'; |
| 10 import 'package:analyzer/src/generated/utilities_dart.dart'; | 10 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 return b; | 856 return b; |
| 857 } | 857 } |
| 858 | 858 |
| 859 @override | 859 @override |
| 860 void visitEnumDeclaration(EnumDeclaration node) { | 860 void visitEnumDeclaration(EnumDeclaration node) { |
| 861 UnlinkedEnumBuilder b = new UnlinkedEnumBuilder(); | 861 UnlinkedEnumBuilder b = new UnlinkedEnumBuilder(); |
| 862 b.name = node.name.name; | 862 b.name = node.name.name; |
| 863 b.nameOffset = node.name.offset; | 863 b.nameOffset = node.name.offset; |
| 864 b.values = node.constants | 864 b.values = node.constants |
| 865 .map((EnumConstantDeclaration value) => new UnlinkedEnumValueBuilder( | 865 .map((EnumConstantDeclaration value) => new UnlinkedEnumValueBuilder( |
| 866 name: value.name.name, nameOffset: value.name.offset)) | 866 documentationComment: |
| 867 serializeDocumentation(value.documentationComment), |
| 868 name: value.name.name, |
| 869 nameOffset: value.name.offset)) |
| 867 .toList(); | 870 .toList(); |
| 868 b.documentationComment = serializeDocumentation(node.documentationComment); | 871 b.documentationComment = serializeDocumentation(node.documentationComment); |
| 869 b.annotations = serializeAnnotations(node.metadata); | 872 b.annotations = serializeAnnotations(node.metadata); |
| 870 enums.add(b); | 873 enums.add(b); |
| 871 } | 874 } |
| 872 | 875 |
| 873 @override | 876 @override |
| 874 void visitExportDirective(ExportDirective node) { | 877 void visitExportDirective(ExportDirective node) { |
| 875 UnlinkedExportNonPublicBuilder b = new UnlinkedExportNonPublicBuilder( | 878 UnlinkedExportNonPublicBuilder b = new UnlinkedExportNonPublicBuilder( |
| 876 uriOffset: node.uri.offset, uriEnd: node.uri.end, offset: node.offset); | 879 uriOffset: node.uri.offset, uriEnd: node.uri.end, offset: node.offset); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 /** | 1058 /** |
| 1056 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. | 1059 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. |
| 1057 */ | 1060 */ |
| 1058 class _TypeParameterScope extends _Scope { | 1061 class _TypeParameterScope extends _Scope { |
| 1059 /** | 1062 /** |
| 1060 * Get the number of [_ScopedTypeParameter]s defined in this | 1063 * Get the number of [_ScopedTypeParameter]s defined in this |
| 1061 * [_TypeParameterScope]. | 1064 * [_TypeParameterScope]. |
| 1062 */ | 1065 */ |
| 1063 int get length => _definedNames.length; | 1066 int get length => _definedNames.length; |
| 1064 } | 1067 } |
| OLD | NEW |