1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 00:42:33 +03:00

📝 branchNode.

This commit is contained in:
Rob Rix 2018-06-14 14:51:48 -04:00
parent be464d49e2
commit 480549dd46

View File

@ -113,6 +113,7 @@ import Data.Text.Encoding (decodeUtf8')
import Text.Parser.Combinators as Parsers hiding (choice)
import TreeSitter.Language
-- | Match a branch node, matching its children with the supplied 'Assignment' & returning the result.
branchNode :: (Enum grammar, Ix grammar) => grammar -> Assignment ast grammar a -> Assignment ast grammar a
branchNode sym child = symbol sym *> children child