diff --git a/semantic-tags/src/Language/Python.hs b/semantic-tags/src/Language/Python.hs index fd2cb92eb..66c5803a1 100644 --- a/semantic-tags/src/Language/Python.hs +++ b/semantic-tags/src/Language/Python.hs @@ -6,8 +6,12 @@ module Language.Python import qualified Language.Python.Tags as PyTags import qualified Tags.Tagging.Precise as Tags import qualified TreeSitter.Python.AST as Py +import qualified TreeSitter.Unmarshal as TS newtype Term a = Term { getTerm :: Py.Module a } +instance TS.Unmarshal Term where + unmarshalNode node = Term <$> TS.unmarshalNode node + instance Tags.ToTags Term where tags src = Tags.runTagging src . PyTags.tags . getTerm