diff options
author | Marvin Borner | 2022-03-05 22:42:27 +0100 |
---|---|---|
committer | Marvin Borner | 2022-03-05 22:42:27 +0100 |
commit | 13b00d16f1bec54002897b27fa1b78f4da281160 (patch) | |
tree | a305ca53b17975af488aff6be1ef9d8c54210ce7 /src/Fun/Tree.hs | |
parent | 61f1e8d2b1889ae13f5ca6fccf5776faa7e8a0ef (diff) |
Better function call parsing
Diffstat (limited to 'src/Fun/Tree.hs')
-rw-r--r-- | src/Fun/Tree.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Fun/Tree.hs b/src/Fun/Tree.hs index 817a077..7b87853 100644 --- a/src/Fun/Tree.hs +++ b/src/Fun/Tree.hs @@ -47,15 +47,13 @@ data FunctionPattern = FunctionPattern } deriving Show -data FunctionPatternElement = FunctionPatternParameter String | FunctionPatternString String | FunctionPatternNumber Integer | FunctionPatternWildcard | FunctionPatternSuperWildcard +data FunctionPatternElement = FunctionPatternParameter String | FunctionPatternString String | FunctionPatternNumber Integer | FunctionPatternWildcard deriving (Show, Eq, Ord) -data FunctionBody = FunctionBody - { bElements :: [FunctionBodyElement] - } +data FunctionBody = FunctionBodyCall { cName :: String, cArgs :: [FunctionArgument] } | FunctionBodyInfixCall { iName :: String, iArgs :: [FunctionArgument] } | FunctionBodyValue FunctionArgument | FunctionBodySub FunctionBody deriving Show -data FunctionBodyElement = Statement String | FunctionBodyIdentifier String | FunctionBodyParameter String | FunctionBodyString String | FunctionBodyNumber Integer +data FunctionArgument = FunctionName String | FunctionInfixName String | FunctionParameter String | FunctionString String | FunctionNumber Integer deriving Show ---- |