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

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

Issue 2972543003: Implement toString on ModifierBuilder. (Closed)
Patch Set: Created 3 years, 5 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
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.formal_parameter_builder; 5 library fasta.formal_parameter_builder;
6 6
7 import '../parser/parser.dart' show FormalParameterType; 7 import '../parser/parser.dart' show FormalParameterType;
8 8
9 import 'builder.dart' 9 import 'builder.dart'
10 show LibraryBuilder, MetadataBuilder, ModifierBuilder, TypeBuilder; 10 show LibraryBuilder, MetadataBuilder, ModifierBuilder, TypeBuilder;
(...skipping 13 matching lines...) Expand all
24 24
25 /// True if this parameter is on the form `this.name`. 25 /// True if this parameter is on the form `this.name`.
26 final bool hasThis; 26 final bool hasThis;
27 27
28 FormalParameterType kind = FormalParameterType.REQUIRED; 28 FormalParameterType kind = FormalParameterType.REQUIRED;
29 29
30 FormalParameterBuilder(this.metadata, this.modifiers, this.type, this.name, 30 FormalParameterBuilder(this.metadata, this.modifiers, this.type, this.name,
31 this.hasThis, LibraryBuilder compilationUnit, this.charOffset) 31 this.hasThis, LibraryBuilder compilationUnit, this.charOffset)
32 : super(compilationUnit, charOffset); 32 : super(compilationUnit, charOffset);
33 33
34 String get debugName => "FormalParameterBuilder";
35
34 bool get isRequired => kind.isRequired; 36 bool get isRequired => kind.isRequired;
35 37
36 bool get isPositional => kind.isPositional || kind.isRequired; 38 bool get isPositional => kind.isPositional || kind.isRequired;
37 39
38 bool get isNamed => kind.isNamed; 40 bool get isNamed => kind.isNamed;
39 41
40 bool get isOptional => !isRequired; 42 bool get isOptional => !isRequired;
41 43
42 bool get isLocal => true; 44 bool get isLocal => true;
43 45
44 @override 46 @override
45 String get fullNameForErrors => name; 47 String get fullNameForErrors => name;
46 48
47 FormalParameterBuilder forFormalParameterInitializerScope(); 49 FormalParameterBuilder forFormalParameterInitializerScope();
48 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698