mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
if option is specified, print no-color
This commit is contained in:
parent
bd7a16a52f
commit
7dcec7538b
@ -51,8 +51,11 @@ generateAST (SemanticAST format color source) = do
|
||||
pure $ Data.ByteString.Char8.pack source
|
||||
ast <- parseByteString @TreeSitter.Python.AST.Module @(Range, Span) tree_sitter_python bytestring
|
||||
case format of
|
||||
Show -> print ast
|
||||
Show -> print ast
|
||||
Pretty -> pPrint ast
|
||||
case color of
|
||||
Prelude.True -> pPrintNoColor ast
|
||||
Prelude.False -> pPrint ast
|
||||
|
||||
opts :: ParserInfo SemanticAST
|
||||
opts = info (parseAST <**> helper)
|
||||
|
Loading…
Reference in New Issue
Block a user