OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library fasta.kernel_formal_parameter_builder; |
| 6 |
| 7 import 'package:kernel/ast.dart' show |
| 8 DynamicType, |
| 9 VariableDeclaration; |
| 10 |
| 11 import 'kernel_builder.dart' show |
| 12 FormalParameterBuilder, |
| 13 KernelTypeBuilder, |
| 14 MetadataBuilder; |
| 15 |
| 16 class KernelFormalParameterBuilder |
| 17 extends FormalParameterBuilder<KernelTypeBuilder> { |
| 18 VariableDeclaration declaration; |
| 19 |
| 20 KernelFormalParameterBuilder(List<MetadataBuilder> metadata, |
| 21 int modifiers, KernelTypeBuilder type, String name, |
| 22 bool hasThis) |
| 23 : super (metadata, modifiers, type, name, hasThis); |
| 24 |
| 25 VariableDeclaration build() { |
| 26 return declaration ??= new VariableDeclaration( |
| 27 name, type: type?.build() ?? const DynamicType(), isFinal: isFinal, |
| 28 isConst: isConst); |
| 29 } |
| 30 |
| 31 VariableDeclaration get target => declaration; |
| 32 } |
OLD | NEW |