1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Add AnonymousFunction Syntax constructor

This commit is contained in:
Rick Winfrey 2016-08-22 18:55:54 -05:00
parent 8a61e57eed
commit b4c05feb63

View File

@ -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.)