1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Implement Storable for TSLength.

This commit is contained in:
Rob Rix 2015-11-24 16:39:31 -05:00
parent cb08d79464
commit 76e086cf8c

View File

@ -31,6 +31,13 @@ foreign import ccall "prototype/External/tree-sitter/include/tree_sitter/runtime
data TSLength = TsLength !CSize !CSize
deriving (Show, Eq, Generic, CStorable)
instance Storable TSLength where
alignment l = cAlignment l
sizeOf l = cSizeOf l
peek p = cPeek p
poke p l = cPoke p l
data TSNode = TsNode !(Foreign.Ptr ()) !TSLength
deriving (Show, Eq, Generic, CStorable)
foreign import ccall "prototype/External/tree-sitter/include/tree_sitter/runtime.h ts_document_root_node" ts_document_root_node :: Foreign.Ptr TSDocument -> IO TSNode