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

Side by Side Diff: pkg/fasta/lib/src/builder/formal_parameter_builder.dart

Issue 2629063005: Fasta builders. (Closed)
Patch Set: Address review 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.formal_parameter_builder;
6
7 import 'package:dart_parser/src/parser.dart' show
8 FormalParameterType;
9
10 import 'builder.dart' show
11 MetadataBuilder,
12 ModifierBuilder,
13 TypeBuilder;
14
15 abstract class FormalParameterBuilder<T extends TypeBuilder>
16 extends ModifierBuilder {
17 final List<MetadataBuilder> metadata;
18
19 final int modifiers;
20
21 final T type;
22
23 final String name;
24
25 /// True if this parameter is on the form `this.name`.
26 final bool hasThis;
27
28 FormalParameterType kind = FormalParameterType.REQUIRED;
29
30 FormalParameterBuilder(this.metadata, this.modifiers, this.type, this.name,
31 this.hasThis);
32
33 bool get isRequired => kind.isRequired;
34
35 bool get isPositional => kind.isPositional;
36
37 bool get isNamed => kind.isNamed;
38
39 bool get isOptional => !isRequired;
40
41 bool get isLocal => true;
42 }
OLDNEW
« no previous file with comments | « pkg/fasta/lib/src/builder/field_builder.dart ('k') | pkg/fasta/lib/src/builder/function_type_alias_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698