1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00
This commit is contained in:
Ayman Nadeem 2019-10-22 12:33:05 -04:00
parent 1761656d27
commit 3e754c35b1

View File

@ -49,7 +49,8 @@ generateAST (SemanticAST format color source) = do
traverse Data.ByteString.readFile filePaths
Right source -> do
pure [Data.ByteString.Char8.pack source]
ast <- for bytestrings $ \bytestring -> do parseByteString @TreeSitter.Python.AST.Module @(Range, Span) tree_sitter_python bytestring
for_ bytestrings $ \bytestring -> do
ast <- parseByteString @TreeSitter.Python.AST.Module @(Range, Span) tree_sitter_python bytestring
case format of
Show -> print ast
Pretty -> pPrint ast