1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 21:01:35 +03:00

Committed choices are really committed.

This commit is contained in:
Rob Rix 2017-08-03 20:30:55 -04:00
parent cb58739e48
commit e9c61048ec

View File

@ -274,7 +274,7 @@ runAssignment toNode source = (\ assignment state -> go assignment state >>= req
Children child -> (do
(a, state') <- go child state { stateNodes = toList node } >>= requireExhaustive
yield a (advance state' { stateNodes = stateNodes state })) <> anywhere (Just node)
Choose choices _ | Just choice <- IntMap.lookup (fromEnum (nodeSymbol (toNode node))) choices -> yield choice state <> anywhere (Just node)
Choose choices _ | Just choice <- IntMap.lookup (fromEnum (nodeSymbol (toNode node))) choices -> yield choice state
_ -> anywhere (Just node)
anywhere node = case assignment of