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

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

Issue 1687793003: Remove irrelevant TODOs from summary code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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) 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 int assignTypeSlot() => ++numSlots; 296 int assignTypeSlot() => ++numSlots;
297 297
298 /** 298 /**
299 * Build a [_Scope] object containing the names defined within the body of a 299 * Build a [_Scope] object containing the names defined within the body of a
300 * class declaration. 300 * class declaration.
301 */ 301 */
302 _Scope buildClassMemberScope( 302 _Scope buildClassMemberScope(
303 String className, NodeList<ClassMember> members) { 303 String className, NodeList<ClassMember> members) {
304 _Scope scope = new _Scope(); 304 _Scope scope = new _Scope();
305 for (ClassMember member in members) { 305 for (ClassMember member in members) {
306 // TODO(paulbery): consider replacing these if-tests with dynamic method
307 // dispatch.
308 if (member is MethodDeclaration) { 306 if (member is MethodDeclaration) {
309 if (member.isSetter || member.isOperator) { 307 if (member.isSetter || member.isOperator) {
310 // We don't have to handle setters or operators because the only 308 // We don't have to handle setters or operators because the only
311 // things we look up are type names and identifiers. 309 // things we look up are type names and identifiers.
312 } else { 310 } else {
313 scope[member.name.name] = new _ScopedClassMember(className); 311 scope[member.name.name] = new _ScopedClassMember(className);
314 } 312 }
315 } else if (member is FieldDeclaration) { 313 } else if (member is FieldDeclaration) {
316 for (VariableDeclaration field in member.fields.variables) { 314 for (VariableDeclaration field in member.fields.variables) {
317 // A field declaration introduces two names, one with a trailing `=`. 315 // A field declaration introduces two names, one with a trailing `=`.
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 /** 1020 /**
1023 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. 1021 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s.
1024 */ 1022 */
1025 class _TypeParameterScope extends _Scope { 1023 class _TypeParameterScope extends _Scope {
1026 /** 1024 /**
1027 * Get the number of [_ScopedTypeParameter]s defined in this 1025 * Get the number of [_ScopedTypeParameter]s defined in this
1028 * [_TypeParameterScope]. 1026 * [_TypeParameterScope].
1029 */ 1027 */
1030 int get length => _definedNames.length; 1028 int get length => _definedNames.length;
1031 } 1029 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698