mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
Update semantic-ql to use tree-sitter-ql package from hackage
This commit is contained in:
parent
b54c022b28
commit
df4ffa8691
@ -31,7 +31,7 @@ common haskell
|
||||
, template-haskell ^>= 2.15
|
||||
, text ^>= 1.2.3
|
||||
, tree-sitter ^>= 0.9
|
||||
, tree-sitter-ql
|
||||
, tree-sitter-ql ^>= 0.1.0.0
|
||||
|
||||
ghc-options:
|
||||
-Weverything
|
||||
|
20
semantic-ql/test/PreciseTest.hs
Normal file
20
semantic-ql/test/PreciseTest.hs
Normal file
@ -0,0 +1,20 @@
|
||||
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
|
||||
module Main (main) where
|
||||
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import qualified Language.QL.AST as QL
|
||||
import Language.QL.Grammar
|
||||
import AST.Test
|
||||
import AST.Unmarshal
|
||||
|
||||
main :: IO ()
|
||||
main
|
||||
= Path.absDir <$> QL.getTestCorpusDir
|
||||
>>= readCorpusFiles'
|
||||
>>= traverse (testCorpus parse)
|
||||
>>= defaultMain . tests
|
||||
where parse = parseByteString @QL.Module @() tree_sitter_ql
|
||||
|
||||
tests :: [TestTree] -> TestTree
|
||||
tests = testGroup "tree-sitter-python corpus tests"
|
20
semantic-ql/test/Test.hs
Normal file
20
semantic-ql/test/Test.hs
Normal file
@ -0,0 +1,20 @@
|
||||
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
|
||||
module Main (main) where
|
||||
|
||||
import AST.Test
|
||||
import AST.Unmarshal
|
||||
import qualified Language.QL.AST as QL
|
||||
import Language.QL.Grammar
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
|
||||
main :: IO ()
|
||||
main
|
||||
= Path.absDir <$> QL.getTestCorpusDir
|
||||
>>= readCorpusFiles'
|
||||
>>= traverse (testCorpus parse)
|
||||
>>= defaultMain . tests
|
||||
where parse = parseByteString @QL.Module @() tree_sitter_ruby
|
||||
|
||||
tests :: [TestTree] -> TestTree
|
||||
tests = testGroup "tree-sitter-ruby corpus tests"
|
Loading…
Reference in New Issue
Block a user