mirror of
https://github.com/github/semantic.git
synced 2024-12-27 00:44:57 +03:00
🔥 the ParseArguments' wrappers.
This commit is contained in:
parent
7c5ba48e2f
commit
8941b23246
@ -30,13 +30,6 @@ data ParseArguments where
|
||||
|
||||
deriving instance Show ParseArguments
|
||||
|
||||
type ParseArguments' = ParseMode -> ParseArguments
|
||||
|
||||
sExpressionParseTree :: ParseArguments'
|
||||
sExpressionParseTree = ParseArguments SExpressionTermRenderer
|
||||
|
||||
jsonParseTree :: ParseArguments'
|
||||
jsonParseTree = ParseArguments JSONTermRenderer
|
||||
|
||||
data ProgramMode = Parse ParseArguments | Diff DiffArguments
|
||||
deriving Show
|
||||
|
@ -73,8 +73,8 @@ arguments = info (version <*> helper <*> argumentsParser) description
|
||||
|
||||
parseCommand = command "parse" (info parseArgumentsParser (progDesc "Print parse trees for path(s)"))
|
||||
parseArgumentsParser = Parse
|
||||
<$> ( ( flag sExpressionParseTree sExpressionParseTree (long "sexpression" <> help "Output s-expression parse trees (default)")
|
||||
<|> flag' jsonParseTree (long "json" <> help "Output JSON parse trees") )
|
||||
<$> ( ( flag (ParseArguments SExpressionTermRenderer) (ParseArguments SExpressionTermRenderer) (long "sexpression" <> help "Output s-expression parse trees (default)")
|
||||
<|> flag' (ParseArguments JSONTermRenderer) (long "json" <> help "Output JSON parse trees") )
|
||||
<*> ( ParsePaths
|
||||
<$> some (argument filePathReader (metavar "FILES..."))
|
||||
<|> pure ParseStdin ))
|
||||
|
Loading…
Reference in New Issue
Block a user