1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

add qualified import

This commit is contained in:
Ayman Nadeem 2019-10-22 13:40:27 -04:00
parent 4c0de190ec
commit 9b17db51b1

View File

@ -4,7 +4,7 @@ module Main (main) where
import System.Environment
import TreeSitter.Unmarshal
import qualified TreeSitter.Python.AST as AST
import TreeSitter.Python
import qualified TreeSitter.Python as Python
import Source.Range
import Source.Span
import Data.ByteString.Char8
@ -50,7 +50,7 @@ generateAST (SemanticAST format color source) = do
Right source -> do
pure [Data.ByteString.Char8.pack source]
for_ bytestrings $ \bytestring -> do
ast <- parseByteString @AST.Module @(Range, Span) tree_sitter_python bytestring
ast <- parseByteString @AST.Module @(Range, Span) Python.tree_sitter_python bytestring
case format of
Show -> print ast
Pretty -> pPrint ast