pub enum CallArg {
Parser(ParserAst),
String(String),
Int(i64),
Flag(String),
Named {
name: String,
parser: ParserAst,
},
Keyword {
name: String,
value: String,
},
RepeatedTail {
name: String,
parser: ParserAst,
count: Option<RepeatCount>,
},
}Expand description
One argument of a constructor call, as written (§7.5).
Variants§
Parser(ParserAst)
A positional parser expression.
String(String)
A positional string literal (sep’s separator, one_of’s set),
already decoded by praxis_syntax::literal::unquote_text.
Int(i64)
A positional whole-number literal — the N of repeated(P, N),
already decoded by praxis_syntax::numeric::parse_int_literal.
Still an i64 here: whether a number is a usable count is
RepeatCount’s question, and it is asked where the span is.
Flag(String)
A bare keyword flag: the ragged of grid(P, ragged, fill: 0).
Named
A named argument name: parser_expr.
Keyword
A named argument whose value is a keyword rather than a parser:
skip: whitespace, fill: 0.
RepeatedTail
A name: repeated(...) argument of a named sections. count is
Some for the bounded repeated(P, N) and None for the greedy
repeated(P) — the distinction the position rule below is entirely
about.