haskell-tree-sitter
haskell-tree-sitter copied to clipboard
ts_node_string is not bridged
Can't peek Tree from Ptr since Tree does not implement Storable typeclass. Is there some other proper way to do it? I am pretty new in Haskell so it might be my fail. Sorry if it is.
If I recall correctly, all of the API which uses Trees actually takes Ptr Tree. Thus, there’s no real value in copying a Tree using Storable since the only thing you could do with it is write it back out to C memory using poke and then pass the resulting pointer around to existing API.
If you describe what you’re trying to accomplish with the Tree, we can probably advise you on the best way to use the API.
I wanted to print it, to see how the whole Tree is look like. Right now i have discovered that i suppose to do it with root node, but i can't find function called ts_node_string which is provided with original library.
@IlhamKhabibullin: Yes, we don’t currently bridge that function; I’ve no objection to doing so, however!
Edited the issue title to note that ts_node_string is not currently bridged.