diff options
Diffstat (limited to 'src/Fun/Tree.hs')
-rw-r--r-- | src/Fun/Tree.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Fun/Tree.hs b/src/Fun/Tree.hs index d6cdecd..ce6cf6c 100644 --- a/src/Fun/Tree.hs +++ b/src/Fun/Tree.hs @@ -17,8 +17,14 @@ data Visibility = PublicVisibility | PrivateVisibility data FunctionDeclaration = FunctionDeclaration String Visibility [String] - [String] + [FunctionFlag] + deriving Show +data FunctionFlag = FunctionInline | FunctionDeprecated | FunctionUnknown deriving Show +instance Read FunctionFlag where + readsPrec _ "inline" = [(FunctionInline, "")] + readsPrec _ "deprecated" = [(FunctionDeprecated, "")] + readsPrec _ _ = [(FunctionUnknown, "")] data FunctionDefinition = FunctionDefinition FunctionPattern FunctionBody deriving Show |