aboutsummaryrefslogtreecommitdiff
path: root/source/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2015-02-15 19:51:07 -0400
committerEduardo Julian2015-02-15 19:51:07 -0400
commit204c82d737e3a77da1ab4a4f4fe364c125e9e5f9 (patch)
tree2763d1f4bfa98a148b832f4af0ce2cf11c3eec33 /source/lux.lux
parentc53ff39359ba62b21ba6b2c9ecb0f80d8b15b438 (diff)
Super refactoring that breaks the system: Part 4
Diffstat (limited to 'source/lux.lux')
-rw-r--r--source/lux.lux17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/lux.lux b/source/lux.lux
index 3e29a50c9..f11e8031b 100644
--- a/source/lux.lux
+++ b/source/lux.lux
@@ -67,6 +67,16 @@
[java.lang.Object _7] [java.lang.Object _8]])
## Base functions & macros
+(def' let'
+ (lambda' _ tokens
+ (lambda' _ state
+ (case' tokens
+ (#Cons lhs (#Cons rhs (#Cons body #Nil)))
+ [(#Cons (#Form (#Cons (#Ident "case'") (#Cons rhs (#Cons lhs (#Cons body #Nil)))))
+ #Nil)
+ state])
+ )))
+
(def' lambda
(lambda' _ tokens
(lambda' _ state
@@ -84,7 +94,8 @@
(#Cons (#Form (#Cons (#Ident "_") args'))
(#Cons body #Nil)))))
#Nil))))))
- [(#Cons output #Nil) state]))))
+ [(#Cons output #Nil) state])
+ )))
(declare-macro lambda)
(def' def
@@ -106,6 +117,10 @@
[(#Cons output #Nil) state])))
(declare-macro def)
+(def (comment tokens state)
+ [#Nil state])
+(declare-macro comment)
+
(def (+ x y)
(jvm;iadd x y))