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:
parent
f2dd247042
commit
706cf454f3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user