Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: pkg/analyzer/lib/src/summary/summarize_ast.dart

Issue 2967503002: Fix the resolution of uri-based part-of directives in the SDK (issue 29598) (Closed)
Patch Set: moved test Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/sdk/sdk.dart ('k') | pkg/analyzer/test/src/context/source_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 @override 1430 @override
1431 void visitPartDirective(PartDirective node) { 1431 void visitPartDirective(PartDirective node) {
1432 parts.add(new UnlinkedPartBuilder( 1432 parts.add(new UnlinkedPartBuilder(
1433 uriOffset: node.uri.offset, 1433 uriOffset: node.uri.offset,
1434 uriEnd: node.uri.end, 1434 uriEnd: node.uri.end,
1435 annotations: serializeAnnotations(node.metadata))); 1435 annotations: serializeAnnotations(node.metadata)));
1436 } 1436 }
1437 1437
1438 @override 1438 @override
1439 void visitPartOfDirective(PartOfDirective node) { 1439 void visitPartOfDirective(PartOfDirective node) {
1440 isCoreLibrary = node.libraryName?.name == 'dart.core'; 1440 isCoreLibrary = node.libraryName?.name == 'dart.core' ||
1441 node.uri?.stringValue == 'core.dart';
1441 isPartOf = true; 1442 isPartOf = true;
1442 } 1443 }
1443 1444
1444 @override 1445 @override
1445 UnlinkedParamBuilder visitSimpleFormalParameter(SimpleFormalParameter node) { 1446 UnlinkedParamBuilder visitSimpleFormalParameter(SimpleFormalParameter node) {
1446 UnlinkedParamBuilder b = serializeParameter(node); 1447 UnlinkedParamBuilder b = serializeParameter(node);
1447 b.type = serializeTypeName(node.type); 1448 b.type = serializeTypeName(node.type);
1448 return b; 1449 return b;
1449 } 1450 }
1450 1451
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 /** 1487 /**
1487 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. 1488 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s.
1488 */ 1489 */
1489 class _TypeParameterScope extends _Scope { 1490 class _TypeParameterScope extends _Scope {
1490 /** 1491 /**
1491 * Get the number of [_ScopedTypeParameter]s defined in this 1492 * Get the number of [_ScopedTypeParameter]s defined in this
1492 * [_TypeParameterScope]. 1493 * [_TypeParameterScope].
1493 */ 1494 */
1494 int get length => _definedNames.length; 1495 int get length => _definedNames.length;
1495 } 1496 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/sdk/sdk.dart ('k') | pkg/analyzer/test/src/context/source_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698