mirror of
https://github.com/github/semantic.git
synced 2025-01-04 05:27:08 +03:00
📝 advance & token.
This commit is contained in:
parent
8bb23f0642
commit
f71eab9ced
@ -165,9 +165,11 @@ source = withFrozenCallStack $ Source `Then` return
|
||||
children :: HasCallStack => Assignment ast grammar a -> Assignment ast grammar a
|
||||
children forEach = withFrozenCallStack $ Children forEach `Then` return
|
||||
|
||||
-- | Advance past the current node.
|
||||
advance :: HasCallStack => Assignment ast grammar ()
|
||||
advance = withFrozenCallStack $ Advance `Then` return
|
||||
|
||||
-- | Match and advance past a node with the given symbol.
|
||||
token :: (Bounded grammar, Ix grammar, HasCallStack) => grammar -> Assignment ast grammar (Record Location)
|
||||
token s = symbol s <* advance
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user