From ebb1e7f2ccf91620a80d93788dce869ca2846cdf Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Wed, 17 Jan 2018 08:57:39 -0800 Subject: [PATCH] Use new makeTerm'' for Ruby assignment --- src/Language/Ruby/Assignment.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Language/Ruby/Assignment.hs b/src/Language/Ruby/Assignment.hs index febe13b58..5b86870f4 100644 --- a/src/Language/Ruby/Assignment.hs +++ b/src/Language/Ruby/Assignment.hs @@ -12,7 +12,7 @@ import Data.Maybe (fromMaybe) import Data.Record import Data.Functor (void) import Data.List.NonEmpty (some1) -import Data.Syntax (contextualize, postContextualize, emptyTerm, parseError, handleError, infixContext, makeTerm, makeTerm', makeTerm1) +import Data.Syntax (contextualize, postContextualize, emptyTerm, parseError, handleError, infixContext, makeTerm, makeTerm', makeTerm'', makeTerm1) import qualified Data.Syntax as Syntax import qualified Data.Syntax.Comment as Comment import qualified Data.Syntax.Declaration as Declaration @@ -136,14 +136,10 @@ expressionChoices = mk s construct = makeTerm <$> symbol s <*> children ((construct .) . fromMaybe <$> emptyTerm <*> optional (symbol ArgumentList *> children expressions)) expressions :: Assignment -expressions = mk <$> location <*> many expression - where mk _ [a] = a - mk loc children = makeTerm loc children +expressions = makeTerm'' <$> location <*> many expression parenthesized_expressions :: Assignment -parenthesized_expressions = mk <$> symbol ParenthesizedStatements <*> children (many expression) - where mk _ [a] = a - mk loc children = makeTerm loc children +parenthesized_expressions = makeTerm'' <$> symbol ParenthesizedStatements <*> children (many expression) identifier :: Assignment identifier =