Skip to content

Repeated Haskell-style comments in Happy quotations are treated as comments #207

@typedrat

Description

@typedrat

To take a few lines out of GHC's Parser.y (because it's where I'm facing this error), consider the following code:

 '{-# INLINE'             { L _ (ITinline_prag _ _ _) } -- INLINE or INLINABLE
 '{-# SPECIALISE'         { L _ (ITspec_prag _) }
 '{-# SPECIALISE_INLINE'  { L _ (ITspec_inline_prag _ _) }

While the syntax highlighting continues correctly for the line containing '{-# INLINE', the subsequent opening comment is interpreted as an actual comment, rather than as the use of the syntax within a literal token, and leads to the rest of the file being treated as a comment.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions