1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 11:46:14 +03:00

serialize to json and print (barring instances)

This commit is contained in:
Ayman Nadeem 2019-11-19 10:09:32 -05:00
parent f2dd247042
commit 706cf454f3

View File

@ -56,6 +56,7 @@ generateAST (SemanticAST format noColor source) =
go = ast >=> display
ast = parseByteString @AST.Module @(Range, Span) Python.tree_sitter_python
display = case format of
Json -> print . toJSON
Show -> print
Pretty | noColor -> pPrintNoColor
| otherwise -> pPrint