From b4c05feb63f1f8d6d7785ffa9bdd9000f4f21079 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Mon, 22 Aug 2016 18:55:54 -0500 Subject: [PATCH] Add AnonymousFunction Syntax constructor --- src/Syntax.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Syntax.hs b/src/Syntax.hs index 85763201b..84d76578c 100644 --- a/src/Syntax.hs +++ b/src/Syntax.hs @@ -22,6 +22,8 @@ data Syntax a f | FunctionCall f [f] -- | A ternary has a condition, a true case and a false case | Ternary { ternaryCondition :: f, ternaryCases :: [f] } + -- | An anonymous function has a list of expressions and params. + | AnonymousFunction { params :: (Maybe f), expressions :: f } -- | A function has a list of expressions. | Function { id :: (Maybe f), params :: (Maybe f), expressions :: f } -- | An assignment has an identifier where f can be a member access, and the value is another syntax element (function call, leaf, etc.)