diff options
author | Eduardo Julian | 2015-03-10 01:39:35 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-03-10 01:39:35 -0400 |
commit | e2fcc7ebbb1f423a3137aa5525b9409f870fe191 (patch) | |
tree | a9765d5d44be59bae48b1a411444f1112b1a00a4 /source | |
parent | a386d0c4688b8749db3e4d612658774a24bc61a2 (diff) |
- Modified the compiler so parser syntax tokens are stored in the same format as lux data-structures, to ease communication between the compiler & macros.
Diffstat (limited to '')
-rw-r--r-- | source/lux.lux | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/lux.lux b/source/lux.lux index b400e0da8..76ea2dc4c 100644 --- a/source/lux.lux +++ b/source/lux.lux @@ -333,9 +333,7 @@ init args))))) -(def complement (. not)) - -(def (constant x) +(def (const x) (lambda [_] x)) (def (int> x y) @@ -574,15 +572,15 @@ (let [output (case' tokens (#Cons [tag (#Cons [func (#Cons [record #Nil])])]) (` (let [_record_ (~ record)] - (set@' (~ tag) _record_ ((~ func) (get@' (~ tag) _record_))))) + (set@' (~ tag) ((~ func) (get@' (~ tag) _record_)) _record_))) (#Cons [tag (#Cons [func #Nil])]) (` (lambda [record] - (` (set@' (~ tag) record ((~ func) (get@' (~ tag) record)))))) + (` (set@' (~ tag) ((~ func) (get@' (~ tag) record)) record)))) (#Cons [tag #Nil]) (` (lambda [func record] - (set@' (~ tag) record (func (get@' (~ tag) record))))))] + (set@' (~ tag) (func (get@' (~ tag) record)) record))))] (return (list output)))) (def (show-int int) |