mirror of
https://github.com/github/semantic.git
synced 2024-12-21 05:41:54 +03:00
Move ParseMode into SemanticCmdLine.
This commit is contained in:
parent
2cd59243a0
commit
4df9192d02
@ -9,7 +9,3 @@ import Renderer
|
||||
|
||||
data DiffMode = DiffStdin | DiffPaths (FilePath, Maybe Language) (FilePath, Maybe Language)
|
||||
deriving Show
|
||||
|
||||
|
||||
data ParseMode = ParseStdin | ParsePaths [(FilePath, Maybe Language)]
|
||||
deriving Show
|
||||
|
@ -3,6 +3,7 @@ module SemanticCmdLine
|
||||
( main
|
||||
-- Testing
|
||||
, runDiff
|
||||
, ParseMode
|
||||
, runParse
|
||||
) where
|
||||
|
||||
@ -13,6 +14,7 @@ import Data.Functor.Both
|
||||
import Data.List.Split (splitWhen)
|
||||
import Data.Version (showVersion)
|
||||
import Development.GitRev
|
||||
import Language
|
||||
import Options.Applicative hiding (action)
|
||||
import Prologue hiding (concurrently, fst, snd, readFile)
|
||||
import Renderer
|
||||
@ -44,6 +46,9 @@ runDiff (SomeRenderer diffRenderer) diffMode = do
|
||||
DiffStdin -> readBlobPairsFromHandle stdin
|
||||
Task.runTask (Semantic.diffBlobPairs diffRenderer blobs)
|
||||
|
||||
data ParseMode = ParseStdin | ParsePaths [(FilePath, Maybe Language)]
|
||||
deriving Show
|
||||
|
||||
runParse :: SomeRenderer TermRenderer -> ParseMode -> IO ByteString
|
||||
runParse (SomeRenderer parseTreeRenderer) parseMode = do
|
||||
blobs <- case parseMode of
|
||||
|
Loading…
Reference in New Issue
Block a user