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

runMany closes over the source and projection.

This commit is contained in:
Rob Rix 2017-07-22 13:29:41 -04:00
parent 37494f9c03
commit 5b674d1940

View File

@ -299,7 +299,7 @@ runAssignment source toNode = go
_ -> []
choiceSymbols choices = (toEnum :: Int -> grammar) <$> IntMap.keys choices
runMany :: forall a. Assignment ast grammar a -> AssignmentState ast grammar -> ([a], AssignmentState ast grammar)
runMany rule state = case runAssignment source toNode rule state of
runMany rule state = case go rule state of
Left err -> ([], state { stateError = Just err })
Right (a, state') | ((/=) `on` stateCounter) state state' ->
let (as, state'') = runMany rule state'