| 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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 @override | 1361 @override |
| 1362 void visitPartDirective(PartDirective node) { | 1362 void visitPartDirective(PartDirective node) { |
| 1363 parts.add(new UnlinkedPartBuilder( | 1363 parts.add(new UnlinkedPartBuilder( |
| 1364 uriOffset: node.uri.offset, | 1364 uriOffset: node.uri.offset, |
| 1365 uriEnd: node.uri.end, | 1365 uriEnd: node.uri.end, |
| 1366 annotations: serializeAnnotations(node.metadata))); | 1366 annotations: serializeAnnotations(node.metadata))); |
| 1367 } | 1367 } |
| 1368 | 1368 |
| 1369 @override | 1369 @override |
| 1370 void visitPartOfDirective(PartOfDirective node) { | 1370 void visitPartOfDirective(PartOfDirective node) { |
| 1371 isCoreLibrary = node.libraryName?.name == 'dart.core'; | 1371 isCoreLibrary = node.libraryName.name == 'dart.core'; |
| 1372 isPartOf = true; | 1372 isPartOf = true; |
| 1373 } | 1373 } |
| 1374 | 1374 |
| 1375 @override | 1375 @override |
| 1376 UnlinkedParamBuilder visitSimpleFormalParameter(SimpleFormalParameter node) { | 1376 UnlinkedParamBuilder visitSimpleFormalParameter(SimpleFormalParameter node) { |
| 1377 UnlinkedParamBuilder b = serializeParameter(node); | 1377 UnlinkedParamBuilder b = serializeParameter(node); |
| 1378 b.type = serializeTypeName(node.type); | 1378 b.type = serializeTypeName(node.type); |
| 1379 return b; | 1379 return b; |
| 1380 } | 1380 } |
| 1381 | 1381 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1417 /** | 1417 /** |
| 1418 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. | 1418 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. |
| 1419 */ | 1419 */ |
| 1420 class _TypeParameterScope extends _Scope { | 1420 class _TypeParameterScope extends _Scope { |
| 1421 /** | 1421 /** |
| 1422 * Get the number of [_ScopedTypeParameter]s defined in this | 1422 * Get the number of [_ScopedTypeParameter]s defined in this |
| 1423 * [_TypeParameterScope]. | 1423 * [_TypeParameterScope]. |
| 1424 */ | 1424 */ |
| 1425 int get length => _definedNames.length; | 1425 int get length => _definedNames.length; |
| 1426 } | 1426 } |
| OLD | NEW |