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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Issue 2695453002: Generalize DeclarationBuilder.resolveTypes. (Closed)
Patch Set: Created 3 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/front_end/lib/src/fasta/source/source_class_builder.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) 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 fasta.source_library_builder; 5 library fasta.source_library_builder;
6 6
7 import 'package:kernel/ast.dart' show 7 import 'package:kernel/ast.dart' show
8 AsyncMarker, 8 AsyncMarker,
9 ProcedureKind; 9 ProcedureKind;
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 List<T> get types => libraryDeclaration.types; 82 List<T> get types => libraryDeclaration.types;
83 83
84 /// When parsing a class, this returns a map of its members (that have been 84 /// When parsing a class, this returns a map of its members (that have been
85 /// parsed so far). 85 /// parsed so far).
86 Map<String, MemberBuilder> get classMembers { 86 Map<String, MemberBuilder> get classMembers {
87 assert(currentDeclaration.parent == libraryDeclaration); 87 assert(currentDeclaration.parent == libraryDeclaration);
88 return currentDeclaration.members; 88 return currentDeclaration.members;
89 } 89 }
90 90
91 List<T> get declarationTypes {
92 assert(currentDeclaration.parent == libraryDeclaration);
93 return currentDeclaration.types;
94 }
95
96 T addNamedType(String name, List<T> arguments, int charOffset); 91 T addNamedType(String name, List<T> arguments, int charOffset);
97 92
98 T addMixinApplication(T supertype, List<T> mixins, int charOffset); 93 T addMixinApplication(T supertype, List<T> mixins, int charOffset);
99 94
100 T addType(T type) { 95 T addType(T type) {
101 currentDeclaration.addType(type); 96 currentDeclaration.addType(type);
102 return type; 97 return type;
103 } 98 }
104 99
105 T addVoidType(int charOffset); 100 T addVoidType(int charOffset);
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 // parent declaration. 410 // parent declaration.
416 parent.addType(type); 411 parent.addType(type);
417 } else { 412 } else {
418 type.bind(builder); 413 type.bind(builder);
419 } 414 }
420 } 415 }
421 } 416 }
422 types.clear(); 417 types.clear();
423 } 418 }
424 } 419 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/source_class_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698