mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
express choice between either string or filepath options
This commit is contained in:
parent
d7ce6ef1d3
commit
be5f00ee50
@ -27,15 +27,15 @@ parseAST = SemanticAST
|
||||
<$> option auto
|
||||
( long "format"
|
||||
<> help "Specify desired output: show, json, sexpression" )
|
||||
<*> option auto
|
||||
<*> (Left <$> strOption
|
||||
( long "sourcefile"
|
||||
<> metavar "FILEPATH"
|
||||
<> help "Specify filepath containing source code to parse" )
|
||||
<*> option auto
|
||||
( long "sourceString"
|
||||
<|> Right <$> strOption
|
||||
(long "sourceString"
|
||||
<> metavar "STRING"
|
||||
<> help "Specify source input to parse"
|
||||
)
|
||||
))
|
||||
|
||||
main :: IO ()
|
||||
main = generateAST =<< execParser opts
|
||||
|
Loading…
Reference in New Issue
Block a user