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

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

Issue 1713763003: Resynthesize parameter visible ranges. (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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_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) 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 summary_resynthesizer; 5 library summary_resynthesizer;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 case UnlinkedParamKind.named: 1704 case UnlinkedParamKind.named:
1705 parameterElement.parameterKind = ParameterKind.NAMED; 1705 parameterElement.parameterKind = ParameterKind.NAMED;
1706 break; 1706 break;
1707 case UnlinkedParamKind.positional: 1707 case UnlinkedParamKind.positional:
1708 parameterElement.parameterKind = ParameterKind.POSITIONAL; 1708 parameterElement.parameterKind = ParameterKind.POSITIONAL;
1709 break; 1709 break;
1710 case UnlinkedParamKind.required: 1710 case UnlinkedParamKind.required:
1711 parameterElement.parameterKind = ParameterKind.REQUIRED; 1711 parameterElement.parameterKind = ParameterKind.REQUIRED;
1712 break; 1712 break;
1713 } 1713 }
1714 if (serializedParameter.visibleOffset != 0) {
1715 parameterElement.setVisibleRange(
1716 serializedParameter.visibleOffset, serializedParameter.visibleLength);
1717 }
1714 return parameterElement; 1718 return parameterElement;
1715 } 1719 }
1716 1720
1717 /** 1721 /**
1718 * Create, but do not populate, the [CompilationUnitElement] for a part other 1722 * Create, but do not populate, the [CompilationUnitElement] for a part other
1719 * than the defining compilation unit. 1723 * than the defining compilation unit.
1720 */ 1724 */
1721 CompilationUnitElementImpl buildPart( 1725 CompilationUnitElementImpl buildPart(
1722 String uri, UnlinkedPart partDecl, UnlinkedUnit serializedPart) { 1726 String uri, UnlinkedPart partDecl, UnlinkedUnit serializedPart) {
1723 Source unitSource = 1727 Source unitSource =
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
2408 List<DartType> typeArguments = const <DartType>[]; 2412 List<DartType> typeArguments = const <DartType>[];
2409 if (numTypeArguments != 0) { 2413 if (numTypeArguments != 0) {
2410 typeArguments = <DartType>[]; 2414 typeArguments = <DartType>[];
2411 for (int i = 0; i < numTypeArguments; i++) { 2415 for (int i = 0; i < numTypeArguments; i++) {
2412 typeArguments.add(getTypeArgument(i)); 2416 typeArguments.add(getTypeArgument(i));
2413 } 2417 }
2414 } 2418 }
2415 return typeArguments; 2419 return typeArguments;
2416 } 2420 }
2417 } 2421 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698