pub enum ArgKind {
Parser,
String,
Int,
Flag(String),
Named(String),
Keyword(String),
RepeatedTail(String),
}Expand description
What one argument of a constructor call is, with no payload — enough to decide whether the call has the shape §7.5 gives it.
The payloads live in praxis-hir’s CallArg (they hold a ParserAst and
the rowan text). This is the projection both callers can share: the HIR
bridge and the capture-body parser in crate::body check the same table,
so the two grammars cannot drift.
Variants§
Parser
A positional parser expression.
String
A positional string literal.
Int
A positional whole-number literal — the count of repeated(P, N).
Flag(String)
A bare keyword flag, e.g. the ragged of grid(P, ragged, fill: 0).
Named(String)
A named argument name: parser — the value is a parser expression.
Keyword(String)
A named argument name: keyword whose value is a keyword, not a
parser: chars’s skip:, grid’s fill:.
Distinct from ArgKind::Named because check_call must tell the
two apart: only the constructors §7.5 gives a keyword argument accept
one, and block, choice and named sections must refuse it.
RepeatedTail(String)
A named name: repeated(P) tail.