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

Unable to distinguish between macro calls and selected symbols #19

Open
AzureMarker opened this issue Nov 20, 2020 · 0 comments
Open

Unable to distinguish between macro calls and selected symbols #19

AzureMarker opened this issue Nov 20, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@AzureMarker
Copy link
Owner

AzureMarker commented Nov 20, 2020

Originally found here: #17 (comment)

Given this:

X: () = {};

Y: () = {};

F = {
    <a: X> Y <Y> => f(<>)
};

The alternative in F has 2 symbols: <a: X> and Y<Y>.

After diving into LALRPOP's code, it looks like their lexer emits either a MacroId or a normal Id depending on if there is an < immediately following an identifier (with no space in-between):
https://github.com/lalrpop/lalrpop/blob/cba3a7463c014b8444623848219532628054e9a1/lalrpop/src/tok/mod.rs#L647

@AzureMarker AzureMarker added the bug Something isn't working label Nov 20, 2020
@AzureMarker AzureMarker changed the title Unable to distinguish between macros and selected symbols Unable to distinguish between macro calls and selected symbols Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant