1
1
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:
Ayman Nadeem 2019-10-15 13:27:20 -04:00
parent d7ce6ef1d3
commit be5f00ee50

View File

@ -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