Open TheOnlyTails opened 7 months ago
LALRPOP recently added support for cascading precedence annotations, which apply to all alternatives below them until the next annotation/end of the rule, as so:
Expr: Expr = { #[precedence(level="1")] <Number> => ... "-" <Expr> => ... #[precedence(level="2", assoc="left")] <left: Expr> "*" <right: Expr> => ..., <left: Expr> "/" <right: Expr> => ..., #[precedence(level="3", assoc="left")] <left: Expr> "+" <right: Expr> => ... <left: Expr> "-" <right: Expr> => ..., };
However, this plugin doesn't support this, and requires an annotation on every alternative.
LALRPOP recently added support for cascading precedence annotations, which apply to all alternatives below them until the next annotation/end of the rule, as so:
However, this plugin doesn't support this, and requires an annotation on every alternative.