mirror of
https://github.com/github/semantic.git
synced 2024-12-11 20:44:37 +03:00
Last shims.
This commit is contained in:
parent
0e0b897b2e
commit
af7b4b578a
@ -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
|
||||
|
||||
|
||||
@ -8,16 +8,18 @@ import AST.TestHelpers
|
||||
import AST.Unmarshal
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import qualified Bazel.Runfiles as Runfiles
|
||||
import qualified System.Path.Fixture as Fixture
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
rf <- Runfiles.create
|
||||
-- dirs <- Path.absDir <$> Go.getTestCorpusDir
|
||||
#if BAZEL_BUILD
|
||||
rf <- Fixture.create
|
||||
let ?project = Path.relDir "external/tree-sitter-go"
|
||||
?runfiles = rf
|
||||
let dirs = Fixture.absRelDir "corpus"
|
||||
#else
|
||||
dirs <- Path.absRel <$> Go.getTestCorpusDir
|
||||
#endif
|
||||
|
||||
readCorpusFiles' dirs
|
||||
>>= traverse (testCorpus parse)
|
||||
|
@ -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,3 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE ImplicitParams #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TypeApplications #-}
|
||||
@ -9,7 +10,6 @@ where
|
||||
|
||||
import AST.TestHelpers
|
||||
import AST.Unmarshal
|
||||
import qualified Bazel.Runfiles as Runfiles
|
||||
import qualified Language.Java.AST as Java
|
||||
import qualified System.Path as Path
|
||||
import qualified System.Path.Fixture as Fixture
|
||||
@ -18,11 +18,15 @@ import TreeSitter.Java
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
rf <- Runfiles.create
|
||||
-- dirs <- Path.absDir <$> Java.getTestCorpusDir
|
||||
#if BAZEL_BUILD
|
||||
rf <- Fixture.create
|
||||
--
|
||||
let ?project = Path.relDir "external/tree-sitter-java"
|
||||
?runfiles = rf
|
||||
let dirs = Fixture.absRelDir "corpus"
|
||||
#else
|
||||
dirs <- Path.absRel <$> Java.getTestCorpusDir
|
||||
#endif
|
||||
readCorpusFiles' dirs
|
||||
>>= traverse (testCorpus parse)
|
||||
>>= defaultMain . tests
|
||||
|
@ -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
|
||||
|
@ -8,16 +8,18 @@ import AST.Unmarshal
|
||||
import qualified Language.TSX.AST as Tsx
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import qualified Bazel.Runfiles as Runfiles
|
||||
import qualified System.Path.Fixture as Fixture
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
rf <- Runfiles.create
|
||||
-- dirs <- Path.absDir <$> Typescript.getTestCorpusDir
|
||||
#if BAZEL_BUILD
|
||||
rf <- Fixture.create
|
||||
let ?project = Path.relDir "external/semantic-typescript"
|
||||
?runfiles = rf
|
||||
let dirs = Fixture.absRelDir "tsx/corpus"
|
||||
#else
|
||||
dirs <- Path.absRel <$> Typescript.getTestCorpusDir
|
||||
#endif
|
||||
|
||||
readCorpusFiles' dirs
|
||||
>>= traverse (testCorpus parse)
|
||||
|
@ -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 TreeSitter.TypeScript
|
||||
@ -7,16 +7,18 @@ import AST.Unmarshal
|
||||
import qualified Language.TypeScript.AST as Ts
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import qualified Bazel.Runfiles as Runfiles
|
||||
import qualified System.Path.Fixture as Fixture
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
rf <- Runfiles.create
|
||||
-- dirs <- Path.absDir <$> Typescript.getTestCorpusDir
|
||||
#if BAZEL_BUILD
|
||||
rf <- Fixture.create
|
||||
let ?project = Path.relDir "external/tree-sitter-typescript"
|
||||
?runfiles = rf
|
||||
let dirs = Fixture.absRelDir "typescript/corpus"
|
||||
#else
|
||||
dirs <- Path.absRel <$> Ts.getTestCorpusDir
|
||||
#endif
|
||||
|
||||
readCorpusFiles' dirs
|
||||
>>= traverse (testCorpus parse)
|
||||
|
Loading…
Reference in New Issue
Block a user