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

Side by Side Diff: pkg/analyzer/lib/src/generated/testing/element_factory.dart

Issue 1125123006: Add a "librarySource" field to CompilationUnitElementImpl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/task/dart.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.testing.element_factory; 8 library engine.testing.element_factory;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ClassElementImpl element = 75 ClassElementImpl element =
76 classElement(typeName, superclassType, parameterNames); 76 classElement(typeName, superclassType, parameterNames);
77 element.typedef = true; 77 element.typedef = true;
78 return element; 78 return element;
79 } 79 }
80 80
81 static ClassElementImpl classTypeAlias2(String typeName, 81 static ClassElementImpl classTypeAlias2(String typeName,
82 [List<String> parameterNames]) => 82 [List<String> parameterNames]) =>
83 classTypeAlias(typeName, objectType, parameterNames); 83 classTypeAlias(typeName, objectType, parameterNames);
84 84
85 static CompilationUnitElementImpl compilationUnit(String fileName) { 85 static CompilationUnitElementImpl compilationUnit(String fileName,
86 [Source librarySource]) {
86 Source source = new NonExistingSource(fileName, UriKind.FILE_URI); 87 Source source = new NonExistingSource(fileName, UriKind.FILE_URI);
87 CompilationUnitElementImpl unit = new CompilationUnitElementImpl(fileName); 88 CompilationUnitElementImpl unit = new CompilationUnitElementImpl(fileName);
88 unit.source = source; 89 unit.source = source;
90 if (librarySource == null) {
91 librarySource = source;
92 }
93 unit.librarySource = librarySource;
89 return unit; 94 return unit;
90 } 95 }
91 96
92 static ConstLocalVariableElementImpl constLocalVariableElement(String name) => 97 static ConstLocalVariableElementImpl constLocalVariableElement(String name) =>
93 new ConstLocalVariableElementImpl(name, 0); 98 new ConstLocalVariableElementImpl(name, 0);
94 99
95 static ConstructorElementImpl constructorElement( 100 static ConstructorElementImpl constructorElement(
96 ClassElement definingClass, String name, bool isConst, 101 ClassElement definingClass, String name, bool isConst,
97 [List<DartType> argumentTypes]) { 102 [List<DartType> argumentTypes]) {
98 DartType type = definingClass.type; 103 DartType type = definingClass.type;
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 setter.variable = variable; 528 setter.variable = variable;
524 setter.parameters = 529 setter.parameters =
525 <ParameterElement>[requiredParameter2("_$name", type)]; 530 <ParameterElement>[requiredParameter2("_$name", type)];
526 setter.returnType = VoidTypeImpl.instance; 531 setter.returnType = VoidTypeImpl.instance;
527 setter.type = new FunctionTypeImpl.con1(setter); 532 setter.type = new FunctionTypeImpl.con1(setter);
528 variable.setter = setter; 533 variable.setter = setter;
529 } 534 }
530 return variable; 535 return variable;
531 } 536 }
532 } 537 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698