aboutsummaryrefslogtreecommitdiff
path: root/src/Fun/Tree.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fun/Tree.hs')
-rw-r--r--src/Fun/Tree.hs18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/Fun/Tree.hs b/src/Fun/Tree.hs
index a7709ee..d6cdecd 100644
--- a/src/Fun/Tree.hs
+++ b/src/Fun/Tree.hs
@@ -11,8 +11,22 @@ data Block = Block FunctionBlock -- | Block DataBlock ...
data FunctionBlock = FunctionBlock FunctionDeclaration [FunctionDefinition]
deriving Show
-data FunctionDeclaration = FunctionDeclarationWithoutFlags String Char [String] | FunctionDeclarationWithFlags String Char [String] [String]
+data Visibility = PublicVisibility | PrivateVisibility
deriving Show
-data FunctionDefinition = FunctionDefinition String String
+data FunctionDeclaration = FunctionDeclaration String
+ Visibility
+ [String]
+ [String]
+ deriving Show
+
+data FunctionDefinition = FunctionDefinition FunctionPattern FunctionBody
+ deriving Show
+data FunctionPattern = FunctionPattern [FunctionPatternElement]
+ deriving Show
+data FunctionPatternElement = FunctionPatternParameter String | FunctionPatternString String | FunctionPatternNumber Integer | Wildcard
+ deriving Show
+data FunctionBody = FunctionBody [FunctionBodyElement]
+ deriving Show
+data FunctionBodyElement = Statement String | FunctionBodyIdentifier String | FunctionBodyParameter String | FunctionBodyString String | FunctionBodyNumber Integer
deriving Show