Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin doesn't support cascading precedence annotations #57

Open
TheOnlyTails opened this issue Apr 12, 2024 · 0 comments
Open

Plugin doesn't support cascading precedence annotations #57

TheOnlyTails opened this issue Apr 12, 2024 · 0 comments

Comments

@TheOnlyTails
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant