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

Happy variables not highlighted #189

Open
sheaf opened this issue May 30, 2021 · 0 comments
Open

Happy variables not highlighted #189

sheaf opened this issue May 30, 2021 · 0 comments
Labels

Comments

@sheaf
Copy link
Collaborator

sheaf commented May 30, 2021

We currently aren't highlighting Happy variables specially:

foo :: { Foo }
    : foo { $1 }

fooBar :: { (Foo, Bar) }
       : foo bar { ($1, $2) }

The first case can be handled straightforwardly by adding a rule for Haskell blocks within Happy that fires before including the rest of the Haskell rules. The second case, however, is problematic, as the Haskell grammar recursively imports itself to handle highlighting inside parentheses (and other nested contexts). So there doesn't seem to be any clear way of handling the variables there. It seemed better, then, to not include any special handling of Happy variables whatsoever, for the sake of consistency.

@sheaf sheaf added the bug label May 30, 2021
sheaf added a commit that referenced this issue May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant