mirror of
https://github.com/github/semantic.git
synced 2025-01-05 05:58:34 +03:00
Implement the Storable instance for TSNode in terms of its CStorable instance.
This commit is contained in:
parent
44ba628c71
commit
038d0b6ff6
@ -26,10 +26,10 @@ data TSNode = TsNode { _data :: Ptr (), offset0 :: CSize, offset1 :: CSize, offs
|
||||
|
||||
instance CStorable TSNode
|
||||
instance Storable TSNode where
|
||||
alignment _ = 32
|
||||
sizeOf _ = 32
|
||||
peek _ = error "Haskell code should never read TSNode values directly."
|
||||
poke _ _ = error "Haskell code should never write TSNode values directly."
|
||||
alignment = cAlignment
|
||||
sizeOf = cSizeOf
|
||||
peek = cPeek
|
||||
poke = cPoke
|
||||
|
||||
foreign import ccall "app/bridge.h ts_document_root_node_p" ts_document_root_node_p :: Ptr TSDocument -> Ptr TSNode -> IO ()
|
||||
foreign import ccall "app/bridge.h ts_node_p_name" ts_node_p_name :: Ptr TSNode -> Ptr TSDocument -> IO CString
|
||||
|
Loading…
Reference in New Issue
Block a user