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

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

Issue 1714173002: Add summary support for ShowElementCombinator.end and .offset. (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/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/src/generated/utilities_dart.dart'; 10 import 'package:analyzer/src/generated/utilities_dart.dart';
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 } 402 }
403 403
404 /** 404 /**
405 * Serialize a [Combinator] into an [UnlinkedCombinator]. 405 * Serialize a [Combinator] into an [UnlinkedCombinator].
406 */ 406 */
407 UnlinkedCombinatorBuilder serializeCombinator(Combinator combinator) { 407 UnlinkedCombinatorBuilder serializeCombinator(Combinator combinator) {
408 UnlinkedCombinatorBuilder b = new UnlinkedCombinatorBuilder(); 408 UnlinkedCombinatorBuilder b = new UnlinkedCombinatorBuilder();
409 if (combinator is ShowCombinator) { 409 if (combinator is ShowCombinator) {
410 b.shows = 410 b.shows =
411 combinator.shownNames.map((SimpleIdentifier id) => id.name).toList(); 411 combinator.shownNames.map((SimpleIdentifier id) => id.name).toList();
412 b.offset = combinator.offset;
413 b.end = combinator.end;
412 } else if (combinator is HideCombinator) { 414 } else if (combinator is HideCombinator) {
413 b.hides = 415 b.hides =
414 combinator.hiddenNames.map((SimpleIdentifier id) => id.name).toList(); 416 combinator.hiddenNames.map((SimpleIdentifier id) => id.name).toList();
415 } else { 417 } else {
416 throw new StateError( 418 throw new StateError(
417 'Unexpected combinator type: ${combinator.runtimeType}'); 419 'Unexpected combinator type: ${combinator.runtimeType}');
418 } 420 }
419 return b; 421 return b;
420 } 422 }
421 423
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 /** 1127 /**
1126 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. 1128 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s.
1127 */ 1129 */
1128 class _TypeParameterScope extends _Scope { 1130 class _TypeParameterScope extends _Scope {
1129 /** 1131 /**
1130 * Get the number of [_ScopedTypeParameter]s defined in this 1132 * Get the number of [_ScopedTypeParameter]s defined in this
1131 * [_TypeParameterScope]. 1133 * [_TypeParameterScope].
1132 */ 1134 */
1133 int get length => _definedNames.length; 1135 int get length => _definedNames.length;
1134 } 1136 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698