1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Up to but not including the count.

This commit is contained in:
Rob Rix 2015-11-25 15:22:18 -05:00
parent 4aadaae7b6
commit 5158e28349

View File

@ -109,7 +109,7 @@ toTerm document contents (node, category) = do
namedChildren :: Ptr TSNode -> IO [Ptr TSNode]
namedChildren node = do
count <- ts_node_p_named_child_count node
mapM (alloca . getChild) [0..count] where
mapM (alloca . getChild) [0..pred count] where
getChild n out = do
ts_node_p_named_child node n out
return out