| 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 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 void addProcedure( | 188 void addProcedure( |
| 189 List<MetadataBuilder> metadata, | 189 List<MetadataBuilder> metadata, |
| 190 int modifiers, | 190 int modifiers, |
| 191 T returnType, | 191 T returnType, |
| 192 String name, | 192 String name, |
| 193 List<TypeVariableBuilder> typeVariables, | 193 List<TypeVariableBuilder> typeVariables, |
| 194 List<FormalParameterBuilder> formals, | 194 List<FormalParameterBuilder> formals, |
| 195 AsyncMarker asyncModifier, | 195 AsyncMarker asyncModifier, |
| 196 ProcedureKind kind, | 196 ProcedureKind kind, |
| 197 int charOffset, | 197 int charOffset, |
| 198 int charEndOffset, |
| 198 String nativeMethodName, | 199 String nativeMethodName, |
| 199 {bool isTopLevel}); | 200 {bool isTopLevel}); |
| 200 | 201 |
| 201 void addEnum(List<MetadataBuilder> metadata, String name, | 202 void addEnum(List<MetadataBuilder> metadata, String name, |
| 202 List<String> constants, int charOffset); | 203 List<String> constants, int charOffset, int charEndOffset); |
| 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 |
| 212 void addFactoryMethod( | 213 void addFactoryMethod( |
| 213 List<MetadataBuilder> metadata, | 214 List<MetadataBuilder> metadata, |
| 214 int modifiers, | 215 int modifiers, |
| 215 ConstructorReferenceBuilder name, | 216 ConstructorReferenceBuilder name, |
| 216 List<FormalParameterBuilder> formals, | 217 List<FormalParameterBuilder> formals, |
| 217 AsyncMarker asyncModifier, | 218 AsyncMarker asyncModifier, |
| 218 ConstructorReferenceBuilder redirectionTarget, | 219 ConstructorReferenceBuilder redirectionTarget, |
| 219 int charOffset, | 220 int charOffset, |
| 221 int charEndOffset, |
| 220 String nativeMethodName); | 222 String nativeMethodName); |
| 221 | 223 |
| 222 FormalParameterBuilder addFormalParameter(List<MetadataBuilder> metadata, | 224 FormalParameterBuilder addFormalParameter(List<MetadataBuilder> metadata, |
| 223 int modifiers, T type, String name, bool hasThis, int charOffset); | 225 int modifiers, T type, String name, bool hasThis, int charOffset); |
| 224 | 226 |
| 225 TypeVariableBuilder addTypeVariable(String name, T bound, int charOffset); | 227 TypeVariableBuilder addTypeVariable(String name, T bound, int charOffset); |
| 226 | 228 |
| 227 Builder addBuilder(String name, Builder builder, int charOffset) { | 229 Builder addBuilder(String name, Builder builder, int charOffset) { |
| 228 if (name.indexOf(".") != -1 && name.indexOf("&") == -1) { | 230 if (name.indexOf(".") != -1 && name.indexOf("&") == -1) { |
| 229 addCompileTimeError( | 231 addCompileTimeError( |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 } | 503 } |
| 502 | 504 |
| 503 /// Called to register [procedure] as a factory whose types are collected in | 505 /// Called to register [procedure] as a factory whose types are collected in |
| 504 /// [factoryDeclaration]. Later, once the class has been built, we can | 506 /// [factoryDeclaration]. Later, once the class has been built, we can |
| 505 /// synthesize type variables on the factory matching the class'. | 507 /// synthesize type variables on the factory matching the class'. |
| 506 void addFactoryDeclaration( | 508 void addFactoryDeclaration( |
| 507 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) { | 509 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) { |
| 508 factoryDeclarations[procedure] = factoryDeclaration; | 510 factoryDeclarations[procedure] = factoryDeclaration; |
| 509 } | 511 } |
| 510 } | 512 } |
| OLD | NEW |