aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorEduardo Julian2015-05-01 19:18:02 -0400
committerEduardo Julian2015-05-01 19:18:02 -0400
commit52d428514631cf9ed54e2f8ad418ea21165011c7 (patch)
tree2db21388adca2815729184130b34ce752781e936 /source
parenta31500f27a29c34877e94188fad1abac3fefb576 (diff)
Optimized the compiler with 2 tweaks:
- Compilation units are not longer wrapped inside Expression/Statement variants. - analyse-apply* no longer returns lists.
Diffstat (limited to 'source')
-rw-r--r--source/lux.lux26
1 files changed, 0 insertions, 26 deletions
diff --git a/source/lux.lux b/source/lux.lux
index a385bb700..06a9a1e58 100644
--- a/source/lux.lux
+++ b/source/lux.lux
@@ -1364,32 +1364,6 @@
## _
## (return (:' SyntaxList (list syntax)))))
-(def #export (macro-expand syntax state)
- (-> Syntax ($' Lux ($' List Syntax)))
- (case' syntax
- (#Meta [_ (#Form (#Cons [(#Meta [_ (#Symbol macro-name)]) args]))])
- (do Lux:Monad
- [macro' (find-macro macro-name)]
- (case' macro'
- (#Some macro)
- (do Lux:Monad
- [expansion (macro args)
- expansion' (map% Lux:Monad macro-expand expansion)]
- (;return (:' SyntaxList (join-list expansion'))))
-
- #None
- (do Lux:Monad
- [parts' (map% Lux:Monad macro-expand (list& ($symbol macro-name) args))]
- (;return (:' Syntax (list ($form (join-list parts'))))))))
-
- (#Meta [_ (#Tuple members)])
- (do Lux:Monad
- [members' (map% Lux:Monad macro-expand members)]
- (;return (:' Syntax (list ($tuple (join-list members'))))))
-
- _
- (return (:' SyntaxList (list syntax)))))
-
## ## (def (walk-type type)
## ## (-> Syntax ($' Lux Syntax))
## ## (case' type