mirror of
https://github.com/github/semantic.git
synced 2025-01-06 06:46:07 +03:00
First few rounds of shimming.
This commit is contained in:
parent
3f6e85f73d
commit
0e0b897b2e
@ -48,6 +48,8 @@ common haskell
|
||||
-Wno-star-is-type
|
||||
if (impl(ghc >= 8.8))
|
||||
ghc-options: -Wno-missing-deriving-strategies
|
||||
cpp-options:
|
||||
-DBAZEL_BUILD=0
|
||||
|
||||
library
|
||||
import: haskell
|
||||
|
@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications, ImplicitParams #-}
|
||||
{-# LANGUAGE CPP, DisambiguateRecordFields, OverloadedStrings, TypeApplications, ImplicitParams #-}
|
||||
module Main (main) where
|
||||
|
||||
import AST.TestHelpers
|
||||
@ -18,7 +18,7 @@ main = do
|
||||
|
||||
let dirs = Fixture.absRelDir "test/corpus"
|
||||
#else
|
||||
dirs <- Path.absDir <$> Ruby.getTestCorpusDir
|
||||
dirs <- Path.absRel <$> CodeQL.getTestCorpusDir
|
||||
#endif
|
||||
let parse = parseByteString @CodeQL.Ql @() tree_sitter_ql
|
||||
|
||||
|
@ -51,6 +51,8 @@ common haskell
|
||||
-Wno-star-is-type
|
||||
if (impl(ghc >= 8.8))
|
||||
ghc-options: -Wno-missing-deriving-strategies
|
||||
cpp-options:
|
||||
-DBAZEL_BUILD=0
|
||||
|
||||
|
||||
library
|
||||
@ -94,7 +96,7 @@ library
|
||||
-- , trifecta >= 2 && <3
|
||||
-- , unordered-containers ^>= 0.2.10
|
||||
|
||||
-- other-modules:
|
||||
-- other-modules:
|
||||
-- Instances
|
||||
-- , Directive
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications, ImplicitParams #-}
|
||||
{-# LANGUAGE CPP, DisambiguateRecordFields, OverloadedStrings, TypeApplications, ImplicitParams #-}
|
||||
module Main (main) where
|
||||
|
||||
import qualified System.Path as Path
|
||||
@ -7,18 +7,20 @@ import TreeSitter.Python
|
||||
import qualified Language.Python.AST as Py
|
||||
import AST.TestHelpers
|
||||
import AST.Unmarshal
|
||||
import qualified Bazel.Runfiles as Runfiles
|
||||
import qualified System.Path.Fixture as Fixture
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
rf <- Runfiles.create
|
||||
-- dirs <- Path.absDir <$> Ruby.getTestCorpusDir
|
||||
#if BAZEL_BUILD
|
||||
rf <- Fixture.create
|
||||
let ?project = Path.relDir "external/tree-sitter-python"
|
||||
?runfiles = rf
|
||||
|
||||
let dirs = Fixture.absRelDir "test/corpus"
|
||||
parse = parseByteString @Py.Module @() tree_sitter_python
|
||||
#else
|
||||
dirs <- Path.absRel <$> Py.getTestCorpusDir
|
||||
#endif
|
||||
|
||||
let parse = parseByteString @Py.Module @() tree_sitter_python
|
||||
|
||||
readCorpusFiles' dirs
|
||||
>>= traverse (testCorpus parse)
|
||||
|
Loading…
Reference in New Issue
Block a user