1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

📝 leafNode.

This commit is contained in:
Rob Rix 2018-06-14 14:51:55 -04:00
parent 480549dd46
commit 3ef04bb17c

View File

@ -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