From 190b512a822fefbb9c66271feb189cc6ccebaf85 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 15 Nov 2017 23:22:30 -0400 Subject: - Re-named "lux/meta" to to "lux/macro". --- new-luxc/source/luxc/lang/translation.lux | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation.lux') diff --git a/new-luxc/source/luxc/lang/translation.lux b/new-luxc/source/luxc/lang/translation.lux index 1e631205d..9b59e5341 100644 --- a/new-luxc/source/luxc/lang/translation.lux +++ b/new-luxc/source/luxc/lang/translation.lux @@ -7,7 +7,7 @@ [text "text/" Hash] text/format (coll [dict])) - [meta] + [macro] (lang [syntax] (type ["tc" check])) [host] @@ -39,7 +39,7 @@ (def: (process-annotations annsC) (-> Code (Meta [$;Inst Code])) - (do meta;Monad + (do macro;Monad [[_ annsA] (&;with-scope (&;with-type Code (analyse annsC))) @@ -53,10 +53,10 @@ (^code ("lux def" (~ [_ (#;Symbol ["" def-name])]) (~ valueC) (~ annsC))) (hostL;with-context def-name (&;with-fresh-type-env - (do meta;Monad + (do macro;Monad [[annsI annsV] (process-annotations annsC) [_ valueT valueA] (&;with-scope - (if (meta;type? (:! Code annsV)) + (if (macro;type? (:! Code annsV)) (do @ [valueA (&;with-type Type (analyse valueC))] @@ -71,7 +71,7 @@ (wrap [])))) (^code ("lux program" (~ [_ (#;Symbol ["" program-args])]) (~ programC))) - (do meta;Monad + (do macro;Monad [[_ programA] (&;with-scope (&;with-type (type (io;IO Unit)) (analyse programC))) @@ -79,15 +79,15 @@ (statementT;translate-program program-args programI)) (^code ("lux module" (~ annsC))) - (do meta;Monad + (do macro;Monad [[annsI annsV] (process-annotations annsC)] (&;fail (%code annsV))) (^code ((~ [_ (#;Symbol macro-name)]) (~@ args))) - (do meta;Monad - [macro-name (meta;normalize macro-name) - [def-type def-anns def-value] (meta;find-def macro-name)] - (if (meta;macro? def-anns) + (do macro;Monad + [macro-name (macro;normalize macro-name) + [def-type def-anns def-value] (macro;find-def macro-name)] + (if (macro;macro? def-anns) (do @ [expansion (function [compiler] (case (macroH;expand (:! Macro def-value) args compiler) @@ -119,7 +119,7 @@ (def: (with-active-compilation [module-name file-name source-code] action) (All [a] (-> [Text Text Text] (Meta a) (Meta a))) - (do meta;Monad + (do macro;Monad [#let [init-cursor [file-name +1 +0]] output (&;with-source-code [init-cursor +0 source-code] action) @@ -143,20 +143,20 @@ [_ (&io;prepare-module target-dir module-name) [file-name file-content] (&io;read-module source-dirs module-name) #let [module-hash (text/hash file-content)]] - (case (meta;run' compiler - (do meta;Monad - [[_ artifacts _] (moduleL;with-module module-hash module-name - (commonT;with-artifacts - (with-active-compilation [module-name - file-name - file-content] - (exhaust - (do @ - [code (parse module-name) - #let [[cursor _] code]] - (&;with-cursor cursor - (translate code)))))))] - (wrap artifacts))) + (case (macro;run' compiler + (do macro;Monad + [[_ artifacts _] (moduleL;with-module module-hash module-name + (commonT;with-artifacts + (with-active-compilation [module-name + file-name + file-content] + (exhaust + (do @ + [code (parse module-name) + #let [[cursor _] code]] + (&;with-cursor cursor + (translate code)))))))] + (wrap artifacts))) (#e;Success [compiler artifacts]) (do @ [_ (monad;map @ (function [[class-name class-bytecode]] -- cgit v1.2.3