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

More weird bugs in weird grammar #54

Open
dnbln opened this issue Nov 25, 2022 · 0 comments
Open

More weird bugs in weird grammar #54

dnbln opened this issue Nov 25, 2022 · 0 comments

Comments

@dnbln
Copy link
Contributor

dnbln commented Nov 25, 2022

So I was just writing more lalrpop code:

Kw<V, T>: T = {
    <left: @L> V <right: @R> => (<>).into(), // the idea is to cast from a range to the proper keyword type, assuming `T: From<(usize, usize)>`
}

PackageKw = Kw<"package", PackageKw>; // type resolution by lalrpop says it references itself, but intellij-lalrpop doesn't

On a side note, adding the type to PackageKw:

Kw<V, T>: T = {
    <left: @L> V <right: @R> => (<>).into(),
}

PackageKw: PackageKw = Kw<"package", PackageKw>;

image

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