aboutsummaryrefslogtreecommitdiff
path: root/Sjit/Syntax.dcl
diff options
context:
space:
mode:
authorCamil Staps2018-12-24 14:40:24 +0100
committerCamil Staps2018-12-24 14:40:24 +0100
commit4d24cd1e3c8a35df8ea872dda22f431b46c3c64f (patch)
tree5ed2940fe858ddf8d0f72e8a685ff0578de5f862 /Sjit/Syntax.dcl
parentFix compilation for constant functions (allocate space for return value) (diff)
Divide in modules
Diffstat (limited to 'Sjit/Syntax.dcl')
-rw-r--r--Sjit/Syntax.dcl12
1 files changed, 12 insertions, 0 deletions
diff --git a/Sjit/Syntax.dcl b/Sjit/Syntax.dcl
new file mode 100644
index 0000000..a289b5a
--- /dev/null
+++ b/Sjit/Syntax.dcl
@@ -0,0 +1,12 @@
+definition module Sjit.Syntax
+
+:: Expr
+ = Int !Int
+ | Var !String
+ | App !String ![Expr]
+
+:: Function =
+ { fun_name :: !String
+ , fun_args :: ![String]
+ , fun_expr :: !Expr
+ }