| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |