mirror of
https://github.com/github/semantic.git
synced 2025-01-04 21:47:07 +03:00
Reformat the parse command flags.
This commit is contained in:
parent
b818269144
commit
19e9d7f61b
@ -102,15 +102,35 @@ parseCommand :: Mod CommandFields (Task.TaskEff Builder)
|
|||||||
parseCommand = command "parse" (info parseArgumentsParser (progDesc "Generate parse trees for path(s)"))
|
parseCommand = command "parse" (info parseArgumentsParser (progDesc "Generate parse trees for path(s)"))
|
||||||
where
|
where
|
||||||
parseArgumentsParser = do
|
parseArgumentsParser = do
|
||||||
renderer <- flag (parseTermBuilder TermSExpression) (parseTermBuilder TermSExpression) (long "sexpression" <> help "Output s-expression parse trees (default)")
|
renderer
|
||||||
<|> flag' (parseTermBuilder TermJSONTree) (long "json" <> help "Output JSON parse trees")
|
<- flag (parseTermBuilder TermSExpression)
|
||||||
<|> flag' (parseTermBuilder TermJSONGraph) (long "json-graph" <> help "Output JSON adjacency list")
|
(parseTermBuilder TermSExpression)
|
||||||
<|> flag' (parseSymbolsBuilder JSON) (long "symbols" <> help "Output JSON symbol list")
|
( long "sexpression"
|
||||||
<|> flag' (parseSymbolsBuilder JSON) (long "json-symbols" <> help "Output JSON symbol list")
|
<> help "Output s-expression parse trees (default)")
|
||||||
<|> flag' (parseSymbolsBuilder Proto) (long "proto-symbols" <> help "Output JSON symbol list")
|
<|> flag' (parseTermBuilder TermJSONTree)
|
||||||
<|> flag' (parseTermBuilder TermDotGraph) (long "dot" <> help "Output DOT graph parse trees")
|
( long "json"
|
||||||
<|> flag' (parseTermBuilder TermShow) (long "show" <> help "Output using the Show instance (debug only, format subject to change without notice)")
|
<> help "Output JSON parse trees")
|
||||||
<|> flag' (parseTermBuilder TermQuiet) (long "quiet" <> help "Don't produce output, but show timing stats")
|
<|> flag' (parseTermBuilder TermJSONGraph)
|
||||||
|
( long "json-graph"
|
||||||
|
<> help "Output JSON adjacency list")
|
||||||
|
<|> flag' (parseSymbolsBuilder JSON)
|
||||||
|
( long "symbols"
|
||||||
|
<> help "Output JSON symbol list")
|
||||||
|
<|> flag' (parseSymbolsBuilder JSON)
|
||||||
|
( long "json-symbols"
|
||||||
|
<> help "Output JSON symbol list")
|
||||||
|
<|> flag' (parseSymbolsBuilder Proto)
|
||||||
|
( long "proto-symbols"
|
||||||
|
<> help "Output JSON symbol list")
|
||||||
|
<|> flag' (parseTermBuilder TermDotGraph)
|
||||||
|
( long "dot"
|
||||||
|
<> help "Output DOT graph parse trees")
|
||||||
|
<|> flag' (parseTermBuilder TermShow)
|
||||||
|
( long "show"
|
||||||
|
<> help "Output using the Show instance (debug only, format subject to change without notice)")
|
||||||
|
<|> flag' (parseTermBuilder TermQuiet)
|
||||||
|
( long "quiet"
|
||||||
|
<> help "Don't produce output, but show timing stats")
|
||||||
filesOrStdin <- FilesFromGitRepo
|
filesOrStdin <- FilesFromGitRepo
|
||||||
<$> option str (long "gitDir" <> help "A .git directory to read from")
|
<$> option str (long "gitDir" <> help "A .git directory to read from")
|
||||||
<*> option shaReader (long "sha" <> help "The commit SHA1 to read from")
|
<*> option shaReader (long "sha" <> help "The commit SHA1 to read from")
|
||||||
|
Loading…
Reference in New Issue
Block a user