From 890d05dfd75162e2307bb7a6efee021ec600dcbf Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 30 Oct 2019 14:30:52 -0400 Subject: [PATCH] :fire: branchNode/leafNode/toTerm. --- src/Assigning/Assignment.hs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/Assigning/Assignment.hs b/src/Assigning/Assignment.hs index dbc82576e..bc0b95771 100644 --- a/src/Assigning/Assignment.hs +++ b/src/Assigning/Assignment.hs @@ -62,9 +62,6 @@ module Assigning.Assignment ( Assignment , L.Loc(..) -- Combinators -, branchNode -, leafNode -, toTerm , Alternative(..) , MonadError(..) , MonadFail(..) @@ -109,21 +106,6 @@ import Source.Span as Span 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 => 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 => grammar -> Assignment ast grammar Text -leafNode sym = symbol sym *> source - --- | Wrap an 'Assignment' producing @syntax@ up into an 'Assignment' producing 'Term's. -toTerm :: Element syntax syntaxes - => Assignment ast grammar (syntax (Term (Sum syntaxes) L.Loc)) - -> Assignment ast grammar (Term (Sum syntaxes) L.Loc) -toTerm syntax = termIn <$> location <*> (inject <$> syntax) - - -- | Assignment from an AST with some set of 'symbol's onto some other value. -- -- This is essentially a parser.