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

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

Issue 1676573002: Add name/offset constructors for default parameter elements. (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 | « pkg/analyzer/lib/src/generated/testing/element_factory.dart ('k') | no next file » | 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/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 } 1305 }
1306 return buildType(type); 1306 return buildType(type);
1307 } 1307 }
1308 1308
1309 /** 1309 /**
1310 * Resynthesize a [ParameterElement]. 1310 * Resynthesize a [ParameterElement].
1311 */ 1311 */
1312 ParameterElement buildParameter(UnlinkedParam serializedParameter) { 1312 ParameterElement buildParameter(UnlinkedParam serializedParameter) {
1313 ParameterElementImpl parameterElement; 1313 ParameterElementImpl parameterElement;
1314 if (serializedParameter.isInitializingFormal) { 1314 if (serializedParameter.isInitializingFormal) {
1315 parameterElement = new FieldFormalParameterElementImpl.forNameAndOffset( 1315 parameterElement = new FieldFormalParameterElementImpl(
1316 serializedParameter.name, serializedParameter.nameOffset) 1316 serializedParameter.name, serializedParameter.nameOffset)
1317 ..field = fields[serializedParameter.name]; 1317 ..field = fields[serializedParameter.name];
1318 } else { 1318 } else {
1319 parameterElement = new ParameterElementImpl( 1319 parameterElement = new ParameterElementImpl(
1320 serializedParameter.name, serializedParameter.nameOffset); 1320 serializedParameter.name, serializedParameter.nameOffset);
1321 } 1321 }
1322 if (serializedParameter.isFunctionTyped) { 1322 if (serializedParameter.isFunctionTyped) {
1323 FunctionElementImpl parameterTypeElement = 1323 FunctionElementImpl parameterTypeElement =
1324 new FunctionElementImpl('', -1); 1324 new FunctionElementImpl('', -1);
1325 parameterTypeElement.synthetic = true; 1325 parameterTypeElement.synthetic = true;
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 } 1838 }
1839 : () => this.element; 1839 : () => this.element;
1840 // TODO(paulberry): Is it a bug that we have to pass `false` for 1840 // TODO(paulberry): Is it a bug that we have to pass `false` for
1841 // isInstantiated? 1841 // isInstantiated?
1842 return new DeferredFunctionTypeImpl(computer, null, typeArguments, false); 1842 return new DeferredFunctionTypeImpl(computer, null, typeArguments, false);
1843 } else { 1843 } else {
1844 return null; 1844 return null;
1845 } 1845 }
1846 } 1846 }
1847 } 1847 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/testing/element_factory.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698