| Index: pkg/fasta/lib/src/kernel/kernel_formal_parameter_builder.dart
|
| diff --git a/pkg/fasta/lib/src/kernel/kernel_formal_parameter_builder.dart b/pkg/fasta/lib/src/kernel/kernel_formal_parameter_builder.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e435d734a8c2fcf1def35d05091520b6d7ab55a4
|
| --- /dev/null
|
| +++ b/pkg/fasta/lib/src/kernel/kernel_formal_parameter_builder.dart
|
| @@ -0,0 +1,32 @@
|
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +library fasta.kernel_formal_parameter_builder;
|
| +
|
| +import 'package:kernel/ast.dart' show
|
| + DynamicType,
|
| + VariableDeclaration;
|
| +
|
| +import 'kernel_builder.dart' show
|
| + FormalParameterBuilder,
|
| + KernelTypeBuilder,
|
| + MetadataBuilder;
|
| +
|
| +class KernelFormalParameterBuilder
|
| + extends FormalParameterBuilder<KernelTypeBuilder> {
|
| + VariableDeclaration declaration;
|
| +
|
| + KernelFormalParameterBuilder(List<MetadataBuilder> metadata,
|
| + int modifiers, KernelTypeBuilder type, String name,
|
| + bool hasThis)
|
| + : super (metadata, modifiers, type, name, hasThis);
|
| +
|
| + VariableDeclaration build() {
|
| + return declaration ??= new VariableDeclaration(
|
| + name, type: type?.build() ?? const DynamicType(), isFinal: isFinal,
|
| + isConst: isConst);
|
| + }
|
| +
|
| + VariableDeclaration get target => declaration;
|
| +}
|
|
|