1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

define a way to pass in something from stdin

This commit is contained in:
Ayman Nadeem 2019-10-03 17:56:38 -04:00
parent 17f696fd49
commit ac5e0af406

View File

@ -40,3 +40,8 @@ generateAST :: SemanticAST -> IO ()
generateAST (SemanticAST file _) = do
bytestring <- Data.ByteString.readFile file
print =<< parseByteString @TreeSitter.Python.AST.Module @(Range, Span) tree_sitter_python bytestring
-- cat something in
stdInput :: Parser Input
stdInput = flag' StdInput
( long "stdin"
<> help "Read from stdin" )