aboutsummaryrefslogtreecommitdiff
path: root/src/Fun/Tree.hs
diff options
context:
space:
mode:
authorMarvin Borner2022-03-05 22:42:27 +0100
committerMarvin Borner2022-03-05 22:42:27 +0100
commit13b00d16f1bec54002897b27fa1b78f4da281160 (patch)
treea305ca53b17975af488aff6be1ef9d8c54210ce7 /src/Fun/Tree.hs
parent61f1e8d2b1889ae13f5ca6fccf5776faa7e8a0ef (diff)
Better function call parsing
Diffstat (limited to 'src/Fun/Tree.hs')
-rw-r--r--src/Fun/Tree.hs8
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
----