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:
parent
17f696fd49
commit
ac5e0af406
@ -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" )
|
||||
|
Loading…
Reference in New Issue
Block a user