Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: pkg/fasta/lib/src/kernel/kernel_formal_parameter_builder.dart

Issue 2631693002: Fasta kernel builders. (Closed)
Patch Set: Address comments. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « pkg/fasta/lib/src/kernel/kernel_field_builder.dart ('k') | pkg/fasta/lib/src/kernel/kernel_function_type_alias_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698