mirror of
https://github.com/github/semantic.git
synced 2024-12-28 09:21:35 +03:00
Assign non-pairs a key from their substrings.
This commit is contained in:
parent
09ec17cbb6
commit
c6e5f89dfe
@ -76,7 +76,7 @@ documentToTerm document contents = alloca $ \root -> do
|
||||
_ | member name fixedProductions -> Fixed $ fmap snd children
|
||||
_ | otherwise -> Indexed $ fmap snd children)
|
||||
where assignKey ("pair", node) = ("pair", node)
|
||||
assignKey (name, node) = (name, node)
|
||||
assignKey (_, node@(Info range _ :< _)) = (substring range contents, node)
|
||||
|
||||
withNamedChildren :: Ptr TSNode -> (Ptr TSNode -> IO (String, a)) -> IO [(String, a)]
|
||||
withNamedChildren node transformNode = do
|
||||
|
Loading…
Reference in New Issue
Block a user