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 AsyncMarker, ProcedureKind; | 7 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; |
8 | 8 |
9 import '../combinator.dart' show Combinator; | 9 import '../combinator.dart' show Combinator; |
10 | 10 |
11 import '../errors.dart' show internalError; | 11 import '../errors.dart' show internalError; |
12 | 12 |
13 import '../messages.dart' show warning; | 13 import '../messages.dart' show warning; |
14 | 14 |
15 import '../import.dart' show Import; | 15 import '../import.dart' show Import; |
16 | 16 |
17 import 'source_loader.dart' show SourceLoader; | 17 import 'source_loader.dart' show SourceLoader; |
18 | 18 |
19 import '../builder/scope.dart' show Scope; | 19 import '../builder/scope.dart' show Scope; |
20 | 20 |
21 import '../builder/builder.dart' | 21 import '../builder/builder.dart' |
22 show | 22 show |
23 Builder, | 23 Builder, |
24 ClassBuilder, | 24 ClassBuilder, |
25 ConstructorReferenceBuilder, | 25 ConstructorReferenceBuilder, |
26 FormalParameterBuilder, | 26 FormalParameterBuilder, |
| 27 FunctionTypeBuilder, |
27 LibraryBuilder, | 28 LibraryBuilder, |
28 MemberBuilder, | 29 MemberBuilder, |
29 MetadataBuilder, | 30 MetadataBuilder, |
30 PrefixBuilder, | 31 PrefixBuilder, |
31 ProcedureBuilder, | 32 ProcedureBuilder, |
32 TypeBuilder, | 33 TypeBuilder, |
33 TypeDeclarationBuilder, | 34 TypeDeclarationBuilder, |
34 TypeVariableBuilder, | 35 TypeVariableBuilder, |
35 Unhandled; | 36 Unhandled; |
36 | 37 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 List<String> constants, int charOffset); | 203 List<String> constants, int charOffset); |
203 | 204 |
204 void addFunctionTypeAlias( | 205 void addFunctionTypeAlias( |
205 List<MetadataBuilder> metadata, | 206 List<MetadataBuilder> metadata, |
206 T returnType, | 207 T returnType, |
207 String name, | 208 String name, |
208 List<TypeVariableBuilder> typeVariables, | 209 List<TypeVariableBuilder> typeVariables, |
209 List<FormalParameterBuilder> formals, | 210 List<FormalParameterBuilder> formals, |
210 int charOffset); | 211 int charOffset); |
211 | 212 |
| 213 FunctionTypeBuilder addFunctionType( |
| 214 T returnType, |
| 215 List<TypeVariableBuilder> typeVariables, |
| 216 List<FormalParameterBuilder> formals, |
| 217 int charOffset); |
| 218 |
212 void addFactoryMethod( | 219 void addFactoryMethod( |
213 List<MetadataBuilder> metadata, | 220 List<MetadataBuilder> metadata, |
214 int modifiers, | 221 int modifiers, |
215 ConstructorReferenceBuilder name, | 222 ConstructorReferenceBuilder name, |
216 List<FormalParameterBuilder> formals, | 223 List<FormalParameterBuilder> formals, |
217 AsyncMarker asyncModifier, | 224 AsyncMarker asyncModifier, |
218 ConstructorReferenceBuilder redirectionTarget, | 225 ConstructorReferenceBuilder redirectionTarget, |
219 int charOffset, | 226 int charOffset, |
220 String nativeMethodName); | 227 String nativeMethodName); |
221 | 228 |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 } | 508 } |
502 | 509 |
503 /// Called to register [procedure] as a factory whose types are collected in | 510 /// Called to register [procedure] as a factory whose types are collected in |
504 /// [factoryDeclaration]. Later, once the class has been built, we can | 511 /// [factoryDeclaration]. Later, once the class has been built, we can |
505 /// synthesize type variables on the factory matching the class'. | 512 /// synthesize type variables on the factory matching the class'. |
506 void addFactoryDeclaration( | 513 void addFactoryDeclaration( |
507 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) { | 514 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) { |
508 factoryDeclarations[procedure] = factoryDeclaration; | 515 factoryDeclarations[procedure] = factoryDeclaration; |
509 } | 516 } |
510 } | 517 } |
OLD | NEW |