aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/lux.lux49
1 files changed, 15 insertions, 34 deletions
diff --git a/source/lux.lux b/source/lux.lux
index db827760d..641be09ca 100644
--- a/source/lux.lux
+++ b/source/lux.lux
@@ -2,40 +2,6 @@
(jvm;interface Function
(: apply (-> [java.lang.Object] java.lang.Object)))
-(jvm;class Tuple0 java.lang.Object
- [])
-(jvm;class Tuple1 java.lang.Object
- [[java.lang.Object _0]])
-(jvm;class Tuple2 java.lang.Object
- [[java.lang.Object _0] [java.lang.Object _1]])
-(jvm;class Tuple3 java.lang.Object
- [[java.lang.Object _0] [java.lang.Object _1]
- [java.lang.Object _2]])
-(jvm;class Tuple4 java.lang.Object
- [[java.lang.Object _0] [java.lang.Object _1]
- [java.lang.Object _2] [java.lang.Object _3]])
-(jvm;class Tuple5 java.lang.Object
- [[java.lang.Object _0] [java.lang.Object _1]
- [java.lang.Object _2] [java.lang.Object _3]
- [java.lang.Object _4]])
-(jvm;class Tuple6 java.lang.Object
- [[java.lang.Object _0] [java.lang.Object _1]
- [java.lang.Object _2] [java.lang.Object _3]
- [java.lang.Object _4] [java.lang.Object _5]])
-(jvm;class Tuple7 java.lang.Object
- [[java.lang.Object _0] [java.lang.Object _1]
- [java.lang.Object _2] [java.lang.Object _3]
- [java.lang.Object _4] [java.lang.Object _5]
- [java.lang.Object _6]])
-(jvm;class Tuple8 java.lang.Object
- [[java.lang.Object _0] [java.lang.Object _1]
- [java.lang.Object _2] [java.lang.Object _3]
- [java.lang.Object _4] [java.lang.Object _5]
- [java.lang.Object _6] [java.lang.Object _7]])
-
-(jvm;class Variant java.lang.Object
- [[java.lang.String tag] [java.lang.Object value]])
-
## Base functions & macros
(def' let'
(lambda' _ tokens
@@ -86,6 +52,21 @@
[(#Cons [output #Nil]) state])))
(declare-macro def)
+## (def (defmacro tokens state)
+## (let' fn-def (case' tokens
+## (#Cons [(#Form (#Cons [(#Ident ?name) (#Cons [(#Ident ?tokens) (#Cons [(#Ident ?state) #Nil])])]))
+## (#Cons [body #Nil])])
+## (#Form (#Cons [(#Form (#Cons [(#Ident "lux;def")
+## (#Cons [(#Ident ?name)
+## (#Cons [(#Ident ?tokens)
+## (#Cons [(#Ident ?state)
+## #Nil])])])]))
+## (#Cons [body
+## #Nil])])))
+## (let' declaration []
+## [(#Cons [fn-def (#Cons [declaration #Nil])]) state])))
+## (declare-macro defmacro)
+
(def (comment tokens state)
[#Nil state])
(declare-macro comment)