Attribute Macro rust_sitter::prec
source · #[prec]Expand description
Defines a precedence level for a non-terminal that has no associativity.
This annotation takes a single, unnamed parameter, which specifies the precedence level. This is used to resolve conflicts with other non-terminals, so that the one with the higher precedence will bind more tightly (appear lower in the parse tree).
§Example
ⓘ
#[rust_sitter::prec(1)]
PriorityExpr(Box<Expr>, Box<Expr>)