mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
📝 leafNode.
This commit is contained in:
parent
480549dd46
commit
3ef04bb17c
@ -117,6 +117,7 @@ import TreeSitter.Language
|
||||
branchNode :: (Enum grammar, Ix grammar) => grammar -> Assignment ast grammar a -> Assignment ast grammar a
|
||||
branchNode sym child = symbol sym *> children child
|
||||
|
||||
-- | Match a leaf node, returning the corresponding 'Text'.
|
||||
leafNode :: (Enum grammar, Ix grammar) => grammar -> Assignment ast grammar Text
|
||||
leafNode sym = symbol sym *> source
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user