Returns true if `sep` is valid for a function call (only `Long` and `End` are allowed because the parser only produces comma separators for function arguments).
(sep: &ArgSepSyntax)
| 630 | /// Returns true if `sep` is valid for a function call (only `Long` and `End` are allowed because |
| 631 | /// the parser only produces comma separators for function arguments). |
| 632 | fn is_function_sep(sep: &ArgSepSyntax) -> bool { |
| 633 | match sep { |
| 634 | ArgSepSyntax::Exactly(ArgSep::Long) | ArgSepSyntax::End => true, |
| 635 | ArgSepSyntax::OneOf(seps) => seps.iter().all(|s| *s == ArgSep::Long), |
| 636 | _ => false, |
| 637 | } |
| 638 | } |
| 639 | |
| 640 | /// Checks that the syntax of a callable that returns a value only uses separators that can appear |
| 641 | /// in a function call (i.e. the comma separator). The parser only produces `ArgSep::Long` for |