mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(haskell): update queries and tests for rewritten parser (#6580)
This commit is contained in:
parent
0319e6eef5
commit
da0efd7398
6 changed files with 238 additions and 373 deletions
|
|
@ -1,10 +1,13 @@
|
|||
{-# LANGUAGE QuasiQuotes #-}
|
||||
-- ^ @keyword.directive
|
||||
|
||||
{-| Main module -}
|
||||
-- ^ @comment.documentation
|
||||
module Main
|
||||
-- ^ @keyword.import
|
||||
-- ^ @module
|
||||
( main
|
||||
-- ^ @variable
|
||||
) where
|
||||
-- ^ @keyword
|
||||
|
||||
|
|
@ -16,12 +19,12 @@ import Prelude hiding (show)
|
|||
import Data.Map (fromList)
|
||||
-- ^ @module
|
||||
import qualified Data.Map as Map
|
||||
-- ^ @constructor
|
||||
-- ^ @module
|
||||
-- ^ @module
|
||||
import qualified Chronos
|
||||
-- ^ @module
|
||||
import qualified Chronos as C
|
||||
-- ^ @constructor
|
||||
-- ^ @module
|
||||
-- ^ @module
|
||||
import FooMod (BarTy (barField))
|
||||
-- ^ @variable.member
|
||||
|
|
@ -47,9 +50,9 @@ mkAQualified x = SomeModule.A x
|
|||
|
||||
class Ord a => PartialOrd a
|
||||
-- ^ @type
|
||||
-- ^ @type
|
||||
-- ^ @variable
|
||||
-- ^ @type
|
||||
-- ^ @type
|
||||
-- ^ @variable
|
||||
|
||||
instance Ord ADT where
|
||||
-- ^ @type
|
||||
|
|
@ -78,7 +81,7 @@ main :: IO ()
|
|||
-- ^ @function
|
||||
-- ^ @operator
|
||||
-- ^ @type
|
||||
-- ^ @string.special.symbol
|
||||
-- ^ @type
|
||||
main = undefined
|
||||
-- ^ @function
|
||||
-- ^ @keyword.exception
|
||||
|
|
@ -95,14 +98,20 @@ someFunc0 x = someFunc1 x
|
|||
-- ^ @number
|
||||
scopedTypeParam (x :: Int) = someFunc x
|
||||
-- ^ @variable.parameter
|
||||
-- ^ @type
|
||||
scopedTypeParam (Just x :: Int) = someFunc x
|
||||
-- ^ @constructor
|
||||
-- ^ @variable.parameter
|
||||
-- ^ @type
|
||||
scopedTypeParam (f :: Int -> Int) = someFunc x
|
||||
-- ^ @function
|
||||
|
||||
someInfix :: Integral a => a -> Double
|
||||
-- ^ @type
|
||||
-- ^ @type
|
||||
-- ^ @variable
|
||||
-- ^ @operator
|
||||
-- ^ @type
|
||||
-- ^ @variable
|
||||
-- ^ @type
|
||||
someInfix x = fromIntegral x `myAdd` floatVal
|
||||
-- ^ @function.call
|
||||
-- ^ @variable
|
||||
|
|
@ -149,8 +158,10 @@ someInfix x = fromIntegral x `myAdd` floatVal
|
|||
|
||||
someIOaction :: IO ()
|
||||
-- ^ @function
|
||||
someIOaction = do
|
||||
-- ^ @keyword
|
||||
anotherIOaction :: IO ()
|
||||
anotherIOaction = do
|
||||
-- ^ @function
|
||||
-- ^ @keyword
|
||||
foo <- SomeModule.someFun <$> getArgs
|
||||
-- ^ @variable
|
||||
-- ^ @module
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ local ts = vim.treesitter
|
|||
|
||||
local COMMENT_NODES = {
|
||||
markdown = "html_block",
|
||||
haskell = "haddock",
|
||||
}
|
||||
|
||||
local function check_assertions(file)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue