tree-sitter-haskell icon indicating copy to clipboard operation
tree-sitter-haskell copied to clipboard

comment in front of haddock messes up parsing

Open ScamChamp opened this issue 8 months ago • 2 comments

This seems to be a problem with the grammar itself, as the code:

-- Comment
-- | Test what
f :: Int

Has the concrete syntax tree of:

(haskell (comment)
 declarations: 
  (declarations
   (signature name: (variable) :: type: (name))))

Here you can see there is no 'haddock' element popping up.

The code:

-- | Test what
f :: Int

Has concrete syntax tree of:

(haskell (haddock)
 declarations: 
  (declarations
   (signature name: (variable) :: type: (name))))

which is correct as it has (haddock).

ScamChamp avatar Apr 30 '25 06:04 ScamChamp