Skip to content

Happy variables not highlighted #189

Description

@sheaf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions