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

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

Issue 2814443005: Fix for summarization of generic function type aliases and support for resynthesizing. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
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 import 'package:analyzer/src/summary/idl.dart';
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 node.functionExpression.typeParameters?.typeParameters?.length ?? 0); 170 node.functionExpression.typeParameters?.typeParameters?.length ?? 0);
171 } 171 }
172 172
173 @override 173 @override
174 visitFunctionTypeAlias(FunctionTypeAlias node) { 174 visitFunctionTypeAlias(FunctionTypeAlias node) {
175 addNameIfPublic(node.name.name, ReferenceKind.typedef, 175 addNameIfPublic(node.name.name, ReferenceKind.typedef,
176 node.typeParameters?.typeParameters?.length ?? 0); 176 node.typeParameters?.typeParameters?.length ?? 0);
177 } 177 }
178 178
179 @override 179 @override
180 visitGenericTypeAlias(GenericTypeAlias node) {
181 addNameIfPublic(node.name.name, ReferenceKind.genericFunctionTypedef,
182 node.typeParameters?.typeParameters?.length ?? 0);
183 }
184
185 @override
180 visitPartDirective(PartDirective node) { 186 visitPartDirective(PartDirective node) {
181 parts.add(node.uri.stringValue ?? ''); 187 parts.add(node.uri.stringValue ?? '');
182 } 188 }
183 189
184 @override 190 @override
185 visitVariableDeclaration(VariableDeclaration node) { 191 visitVariableDeclaration(VariableDeclaration node) {
186 String name = node.name.name; 192 String name = node.name.name;
187 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0); 193 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0);
188 if (!node.isFinal && !node.isConst) { 194 if (!node.isFinal && !node.isConst) {
189 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0); 195 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0);
190 } 196 }
191 } 197 }
192 } 198 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/prelink.dart ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698