mirror of
https://github.com/github/semantic.git
synced 2025-01-07 07:58:12 +03:00
Add AnonymousFunction Syntax constructor
This commit is contained in:
parent
8a61e57eed
commit
b4c05feb63
@ -22,6 +22,8 @@ data Syntax a f
|
|||||||
| FunctionCall f [f]
|
| FunctionCall f [f]
|
||||||
-- | A ternary has a condition, a true case and a false case
|
-- | A ternary has a condition, a true case and a false case
|
||||||
| Ternary { ternaryCondition :: f, ternaryCases :: [f] }
|
| 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.
|
-- | A function has a list of expressions.
|
||||||
| Function { id :: (Maybe f), params :: (Maybe f), expressions :: f }
|
| 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.)
|
-- | An assignment has an identifier where f can be a member access, and the value is another syntax element (function call, leaf, etc.)
|
||||||
|
Loading…
Reference in New Issue
Block a user