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/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
9 import 'package:analyzer/dart/ast/visitor.dart'; | 9 import 'package:analyzer/dart/ast/visitor.dart'; |
10 import 'package:analyzer/dart/element/type.dart' show DartType; | 10 import 'package:analyzer/dart/element/type.dart' show DartType; |
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 | 1255 |
1256 @override | 1256 @override |
1257 void visitImportDirective(ImportDirective node) { | 1257 void visitImportDirective(ImportDirective node) { |
1258 UnlinkedImportBuilder b = new UnlinkedImportBuilder(); | 1258 UnlinkedImportBuilder b = new UnlinkedImportBuilder(); |
1259 b.annotations = serializeAnnotations(node.metadata); | 1259 b.annotations = serializeAnnotations(node.metadata); |
1260 if (node.uri.stringValue == 'dart:core') { | 1260 if (node.uri.stringValue == 'dart:core') { |
1261 hasCoreBeenImported = true; | 1261 hasCoreBeenImported = true; |
1262 } | 1262 } |
1263 b.offset = node.offset; | 1263 b.offset = node.offset; |
1264 b.combinators = node.combinators.map(serializeCombinator).toList(); | 1264 b.combinators = node.combinators.map(serializeCombinator).toList(); |
| 1265 b.configurations = node.configurations.map(serializeConfiguration).toList(); |
1265 if (node.prefix != null) { | 1266 if (node.prefix != null) { |
1266 b.prefixReference = serializeReference(null, node.prefix.name); | 1267 b.prefixReference = serializeReference(null, node.prefix.name); |
1267 b.prefixOffset = node.prefix.offset; | 1268 b.prefixOffset = node.prefix.offset; |
1268 } | 1269 } |
1269 b.isDeferred = node.deferredKeyword != null; | 1270 b.isDeferred = node.deferredKeyword != null; |
1270 b.uri = node.uri.stringValue; | 1271 b.uri = node.uri.stringValue; |
1271 b.uriOffset = node.uri.offset; | 1272 b.uriOffset = node.uri.offset; |
1272 b.uriEnd = node.uri.end; | 1273 b.uriEnd = node.uri.end; |
1273 unlinkedImports.add(b); | 1274 unlinkedImports.add(b); |
1274 } | 1275 } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 /** | 1376 /** |
1376 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. | 1377 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. |
1377 */ | 1378 */ |
1378 class _TypeParameterScope extends _Scope { | 1379 class _TypeParameterScope extends _Scope { |
1379 /** | 1380 /** |
1380 * Get the number of [_ScopedTypeParameter]s defined in this | 1381 * Get the number of [_ScopedTypeParameter]s defined in this |
1381 * [_TypeParameterScope]. | 1382 * [_TypeParameterScope]. |
1382 */ | 1383 */ |
1383 int get length => _definedNames.length; | 1384 int get length => _definedNames.length; |
1384 } | 1385 } |
OLD | NEW |