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:
parent
37494f9c03
commit
5b674d1940
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user