mirror of
https://github.com/github/semantic.git
synced 2025-01-02 12:23:08 +03:00
Inline run
.
This commit is contained in:
parent
af3038fc1f
commit
006dac8f68
@ -266,6 +266,7 @@ runAssignment toRecord = iterFreer run . fmap ((pure .) . (,))
|
||||
runMany rule state = case runAssignment toRecord rule state of
|
||||
Result _ (Just (a, state')) -> let (as, state'') = runMany rule state' in as `seq` (a : as, state'')
|
||||
_ -> ([], state)
|
||||
{-# INLINE run #-}
|
||||
|
||||
dropAnonymous :: (Symbol grammar, Recursive ast) => (forall x. Base ast x -> Maybe grammar) -> AssignmentState ast -> AssignmentState ast
|
||||
dropAnonymous toSymbol state = state { stateNodes = dropWhile ((`notElem` [Just Regular, Nothing]) . fmap symbolType . toSymbol . F.project) (stateNodes state) }
|
||||
|
Loading…
Reference in New Issue
Block a user