diff --git a/semantic-ast/app/Main.hs b/semantic-ast/app/Main.hs index 32a2d32d9..5102b3d41 100644 --- a/semantic-ast/app/Main.hs +++ b/semantic-ast/app/Main.hs @@ -2,7 +2,7 @@ module Main (main) where -import TreeSitter.Unmarshal +import AST.Unmarshal as Unmarshal import qualified Language.Python.AST as AST import qualified TreeSitter.Python as Python import Source.Range @@ -54,7 +54,7 @@ generateAST (SemanticAST format noColor source) = Left filePaths -> traverse Data.ByteString.readFile filePaths Right source -> pure [Data.ByteString.Char8.pack source] go = ast >=> display - ast = parseByteString @AST.Module @(Range, Span) Python.tree_sitter_python -- TODO: generalize for all languages + ast = Unmarshal.parseByteString @AST.Module @(Range, Span) Python.tree_sitter_python -- TODO: generalize for all languages display = case format of Json -> Data.ByteString.Lazy.Char8.putStrLn . encodePretty . either toJSON (marshal . fmap (const ())) -- TODO: replacing range and span annotations with () for which there is a ToJSON instance for now, deal with this later Show -> print