diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/lux.lux | 26 |
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 |