| OLD | NEW |
| 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 'package:front_end/src/fasta/parser/parser.dart' show | 7 import 'package:front_end/src/fasta/parser/parser.dart' show |
| 8 FormalParameterType; | 8 FormalParameterType; |
| 9 | 9 |
| 10 import 'builder.dart' show | 10 import 'builder.dart' show |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 final bool hasThis; | 27 final bool hasThis; |
| 28 | 28 |
| 29 FormalParameterType kind = FormalParameterType.REQUIRED; | 29 FormalParameterType kind = FormalParameterType.REQUIRED; |
| 30 | 30 |
| 31 FormalParameterBuilder(this.metadata, this.modifiers, this.type, this.name, | 31 FormalParameterBuilder(this.metadata, this.modifiers, this.type, this.name, |
| 32 this.hasThis, LibraryBuilder compilationUnit, int charOffset) | 32 this.hasThis, LibraryBuilder compilationUnit, int charOffset) |
| 33 : super(compilationUnit, charOffset); | 33 : super(compilationUnit, charOffset); |
| 34 | 34 |
| 35 bool get isRequired => kind.isRequired; | 35 bool get isRequired => kind.isRequired; |
| 36 | 36 |
| 37 bool get isPositional => kind.isPositional; | 37 bool get isPositional => kind.isPositional || kind.isRequired; |
| 38 | 38 |
| 39 bool get isNamed => kind.isNamed; | 39 bool get isNamed => kind.isNamed; |
| 40 | 40 |
| 41 bool get isOptional => !isRequired; | 41 bool get isOptional => !isRequired; |
| 42 | 42 |
| 43 bool get isLocal => true; | 43 bool get isLocal => true; |
| 44 } | 44 } |
| OLD | NEW |