1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

Tidy up how we get child terms.

This commit is contained in:
Rob Rix 2017-03-27 16:03:35 -04:00
parent 32b6ff17e0
commit 23c4a8b6c3

View File

@ -62,13 +62,11 @@ documentToTerm language document SourceBlob{..} = do
children <- traverse childToTerm nodes
return $! filter isNonEmpty children
let namedChildCount = fromIntegral (nodeNamedChildCount node)
children <- getChildren namedChildCount ts_node_copy_named_child_nodes
children <- getChildren (fromIntegral (nodeNamedChildCount node)) ts_node_copy_named_child_nodes
let sourceSpan = nodeSpan node
let childCount = fromIntegral (nodeChildCount node)
let allChildren = getChildren childCount ts_node_copy_child_nodes
let allChildren = getChildren (fromIntegral (nodeChildCount node)) ts_node_copy_child_nodes
assignTerm language source (range :. categoryForLanguageProductionName language (toS name) :. sourceSpan :. Nil) children allChildren