1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

Inline runMany.

This commit is contained in:
Rob Rix 2017-07-22 13:34:43 -04:00
parent fab398e089
commit 2b72ca3a8a

View File

@ -306,6 +306,7 @@ runAssignment source toNode = go
let (as, state'') = runMany rule state'
in as `seq` (a : as, state'')
| otherwise -> ([a], state')
{-# INLINE runMany #-}
dropAnonymous :: (Symbol grammar, Recursive ast) => (forall x. Base ast x -> Node grammar) -> AssignmentState ast grammar -> AssignmentState ast grammar
dropAnonymous toNode state = state { stateNodes = dropWhile ((/= Regular) . symbolType . nodeSymbol . toNode . F.project) (stateNodes state) }