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

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 2027893002: Start separating ClassElementImpl for Class and Enum. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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) 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 analyzer.src.context.context; 5 library analyzer.src.context.context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 /** 717 /**
718 * Create a minimalistic mock dart:async library 718 * Create a minimalistic mock dart:async library
719 * to stand in for a real one if one does not exist 719 * to stand in for a real one if one does not exist
720 * facilitating creation a type provider without dart:async. 720 * facilitating creation a type provider without dart:async.
721 */ 721 */
722 LibraryElement createMockAsyncLib(LibraryElement coreLibrary) { 722 LibraryElement createMockAsyncLib(LibraryElement coreLibrary) {
723 InterfaceType objType = coreLibrary.getType('Object').type; 723 InterfaceType objType = coreLibrary.getType('Object').type;
724 724
725 ClassElement _classElement(String typeName, [List<String> parameterNames]) { 725 ClassElement _classElement(String typeName, [List<String> parameterNames]) {
726 ClassElementImpl element = 726 ClassElementImpl element =
727 new ClassElementImpl.forNode(AstFactory.identifier3(typeName)); 727 new ClassElementImpl_Class.forNode(AstFactory.identifier3(typeName));
728 element.supertype = objType; 728 element.supertype = objType;
729 InterfaceTypeImpl type = new InterfaceTypeImpl(element); 729 InterfaceTypeImpl type = new InterfaceTypeImpl(element);
730 element.type = type; 730 element.type = type;
731 if (parameterNames != null) { 731 if (parameterNames != null) {
732 int count = parameterNames.length; 732 int count = parameterNames.length;
733 if (count > 0) { 733 if (count > 0) {
734 List<TypeParameterElementImpl> typeParameters = 734 List<TypeParameterElementImpl> typeParameters =
735 new List<TypeParameterElementImpl>(count); 735 new List<TypeParameterElementImpl>(count);
736 List<TypeParameterTypeImpl> typeArguments = 736 List<TypeParameterTypeImpl> typeArguments =
737 new List<TypeParameterTypeImpl>(count); 737 new List<TypeParameterTypeImpl>(count);
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 } 2213 }
2214 DartSdk sdk = factory.dartSdk; 2214 DartSdk sdk = factory.dartSdk;
2215 if (sdk == null) { 2215 if (sdk == null) {
2216 throw new IllegalArgumentException( 2216 throw new IllegalArgumentException(
2217 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2217 "The source factory for an SDK analysis context must have a DartUriRes olver");
2218 } 2218 }
2219 return new AnalysisCache( 2219 return new AnalysisCache(
2220 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2220 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2221 } 2221 }
2222 } 2222 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/builder.dart » ('j') | pkg/analyzer/lib/src/dart/element/element.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698