1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00

Don't need manyTerm now

This commit is contained in:
Rick Winfrey 2017-11-20 16:32:37 -08:00
parent 45253041ac
commit dcce44efab

View File

@ -114,10 +114,6 @@ infixTerm = infixContext comment
manyTermsTill :: Show b => Assignment.Assignment [] Grammar Term -> Assignment.Assignment [] Grammar b -> Assignment.Assignment [] Grammar [Term]
manyTermsTill step end = manyTill (step <|> comment) end
-- | Match a term optionally preceded by comment(s), or a sequence of comments if the term is not present.
manyTerm :: Assignment -> Assignment.Assignment [] Grammar [Term]
manyTerm term = many (contextualize comment term <|> makeTerm1 <$> (Syntax.Context <$> some1 comment <*> emptyTerm))
-- | Match a term and contextualize any comments preceeding or proceeding the term.
term :: Assignment -> Assignment
term term = contextualize comment (postContextualize comment term)