From b6805304770bd719fec6116ea049830b5df95c81 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 23 Feb 2022 01:38:32 +0100 Subject: Wuah --- src/Fun/Tree.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Fun/Tree.hs') 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 -- cgit v1.2.3