AzureMarker / intellij-lalrpop

Jetbrains plugin for the LALRPOP parser-generator
MIT License
16 stars 2 forks source link

More weird bugs in weird grammar #54

Open dnbln opened 1 year ago

dnbln commented 1 year ago

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