| 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 entities; | 5 library entities; |
| 6 | 6 |
| 7 import 'package:front_end/src/fasta/parser/async_modifier.dart' | 7 import 'package:front_end/src/fasta/parser/async_modifier.dart' |
| 8 show AsyncModifier; | 8 show AsyncModifier; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 this.requiredParameters, this.positionalParameters, this.namedParameters); | 245 this.requiredParameters, this.positionalParameters, this.namedParameters); |
| 246 | 246 |
| 247 const ParameterStructure.getter() : this(0, 0, const <String>[]); | 247 const ParameterStructure.getter() : this(0, 0, const <String>[]); |
| 248 | 248 |
| 249 const ParameterStructure.setter() : this(1, 1, const <String>[]); | 249 const ParameterStructure.setter() : this(1, 1, const <String>[]); |
| 250 | 250 |
| 251 /// The number of optional parameters (positional or named). | 251 /// The number of optional parameters (positional or named). |
| 252 int get optionalParameters => | 252 int get optionalParameters => |
| 253 positionalParameters - requiredParameters + namedParameters.length; | 253 positionalParameters - requiredParameters + namedParameters.length; |
| 254 | 254 |
| 255 /// The total number of parameters (required or optional). |
| 256 int get totalParameters => positionalParameters + namedParameters.length; |
| 257 |
| 255 /// Returns the [CallStructure] corresponding to a call site passing all | 258 /// Returns the [CallStructure] corresponding to a call site passing all |
| 256 /// parameters both required and optional. | 259 /// parameters both required and optional. |
| 257 CallStructure get callStructure { | 260 CallStructure get callStructure { |
| 258 return new CallStructure( | 261 return new CallStructure( |
| 259 positionalParameters + namedParameters.length, namedParameters); | 262 positionalParameters + namedParameters.length, namedParameters); |
| 260 } | 263 } |
| 261 } | 264 } |
| OLD | NEW |