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

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

Issue 2629063005: Fasta builders. (Closed)
Patch Set: 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 final bool hasThis;
Johnni Winther 2017/01/16 13:01:19 Add dartdoc. I guess it is of the form `this.x`?
ahe 2017/01/16 15:26:33 Done and you guessed right.
26
27 FormalParameterType kind = FormalParameterType.REQUIRED;
28
29 FormalParameterBuilder(this.metadata, this.modifiers, this.type, this.name,
30 this.hasThis);
31
32 bool get isRequired => kind.isRequired;
33
34 bool get isPositional => kind.isPositional;
35
36 bool get isNamed => kind.isNamed;
37
38 bool get isOptional => !isRequired;
39
40 bool get isLocal => true;
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698