From ac5e0af406f4b9b70df988aceeb267686c168c17 Mon Sep 17 00:00:00 2001 From: Ayman Nadeem Date: Thu, 3 Oct 2019 17:56:38 -0400 Subject: [PATCH] define a way to pass in something from stdin --- semantic-ast/src/CLI.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/semantic-ast/src/CLI.hs b/semantic-ast/src/CLI.hs index 3a76c3994..0f41cb594 100644 --- a/semantic-ast/src/CLI.hs +++ b/semantic-ast/src/CLI.hs @@ -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" )