Formats the repeated argument syntax for help purposes into `output`. `last_singular_sep` contains the separator of the last singular argument syntax, if any, which we need to place inside of the optional group.
(&self, output: &mut String, last_singular_sep: Option<&ArgSepSyntax>)
| 204 | /// `last_singular_sep` contains the separator of the last singular argument syntax, if any, |
| 205 | /// which we need to place inside of the optional group. |
| 206 | fn describe(&self, output: &mut String, last_singular_sep: Option<&ArgSepSyntax>) { |
| 207 | if !self.require_one { |
| 208 | output.push('['); |
| 209 | } |
| 210 | |
| 211 | if let Some(sep) = last_singular_sep { |
| 212 | sep.describe(output); |
| 213 | } |
| 214 | |
| 215 | output.push_str(&self.name); |
| 216 | output.push('1'); |
| 217 | if let RepeatedTypeSyntax::TypedValue(vtype) = self.type_syn { |
| 218 | output.push(vtype.annotation()); |
| 219 | } |
| 220 | |
| 221 | if self.require_one { |
| 222 | output.push('['); |
| 223 | } |
| 224 | |
| 225 | self.sep.describe(output); |
| 226 | output.push_str(".."); |
| 227 | self.sep.describe(output); |
| 228 | |
| 229 | output.push_str(&self.name); |
| 230 | output.push('N'); |
| 231 | if let RepeatedTypeSyntax::TypedValue(vtype) = self.type_syn { |
| 232 | output.push(vtype.annotation()); |
| 233 | } |
| 234 | |
| 235 | output.push(']'); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | /// Syntax specification for a parameter that accepts any scalar type. |
no test coverage detected