mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
📝 choice.
This commit is contained in:
parent
826adc829f
commit
2317d56355
@ -179,6 +179,7 @@ children child = tracing (Children child) `Then` return
|
||||
advance :: HasCallStack => Assignment ast grammar ()
|
||||
advance = tracing Advance `Then` return
|
||||
|
||||
-- | Construct a committed choice table from a list of alternatives. Use this to efficiently select between long lists of rules.
|
||||
choice :: (Enum grammar, Eq (ast (AST ast grammar)), Ix grammar, HasCallStack) => [Assignment ast grammar a] -> Assignment ast grammar a
|
||||
choice [] = empty
|
||||
choice alternatives
|
||||
|
Loading…
Reference in New Issue
Block a user