1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Rename the parameter.

This commit is contained in:
Rob Rix 2015-11-26 16:28:17 -05:00
parent 0e68767028
commit 2353cf3798

View File

@ -87,14 +87,14 @@ keyedProductions = fromList [ "object" ]
fixedProductions = fromList [ "pair", "rel_op", "math_op", "bool_op", "bitwise_op", "type_op", "math_assignment", "assignment", "subscript_access", "member_access", "new_expression", "function_call", "function", "ternary" ]
withNamedChildren :: Ptr TSNode -> (Ptr TSNode -> IO a) -> IO [a]
withNamedChildren node f = do
withNamedChildren node transformNode = do
count <- ts_node_p_named_child_count node
if count == 0
then return []
else mapM (alloca . getChild) [0..pred count] where
getChild n out = do
ts_node_p_named_child node n out
f out
transformNode out
range :: Ptr TSNode -> IO Range
range node = do