aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorEduardo Julian2019-03-03 02:38:11 -0400
committerEduardo Julian2019-03-03 02:38:11 -0400
commit539ad81bbb9034e41e6ca8f5445a9dd239c60be1 (patch)
tree0bf0a4a2189254a49212a7b5dd6dd6531d8071e7 /stdlib
parent56219b002c43690e74e3e0c88fed32143dcc7e28 (diff)
Macros are used for analysis and statements, so they shouldn't belong to analysis.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/source/lux/tool/compiler/default/evaluation.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/default/init.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/default/platform.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis.lux10
-rw-r--r--stdlib/source/lux/tool/compiler/phase/macro.lux (renamed from stdlib/source/lux/tool/compiler/phase/analysis/macro.lux)28
-rw-r--r--stdlib/source/lux/tool/compiler/phase/statement/total.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/program.lux3
7 files changed, 28 insertions, 28 deletions
diff --git a/stdlib/source/lux/tool/compiler/default/evaluation.lux b/stdlib/source/lux/tool/compiler/default/evaluation.lux
index 98da861d7..3310a1fd1 100644
--- a/stdlib/source/lux/tool/compiler/default/evaluation.lux
+++ b/stdlib/source/lux/tool/compiler/default/evaluation.lux
@@ -8,9 +8,9 @@
format]]]
[///
["." phase
+ [macro (#+ Expander)]
["." analysis
- ["." type]
- [macro (#+ Expander)]]
+ ["." type]]
["." synthesis
[".S" expression]]
["." translation]
diff --git a/stdlib/source/lux/tool/compiler/default/init.lux b/stdlib/source/lux/tool/compiler/default/init.lux
index 465112327..41ecc851a 100644
--- a/stdlib/source/lux/tool/compiler/default/init.lux
+++ b/stdlib/source/lux/tool/compiler/default/init.lux
@@ -20,9 +20,9 @@
["." analysis]
["." host]
["." phase
+ [macro (#+ Expander)]
[".P" analysis
- ["." module]
- [macro (#+ Expander)]]
+ ["." module]]
["." synthesis
[".S" expression]]
["." translation]
diff --git a/stdlib/source/lux/tool/compiler/default/platform.lux b/stdlib/source/lux/tool/compiler/default/platform.lux
index d751d2321..959478f28 100644
--- a/stdlib/source/lux/tool/compiler/default/platform.lux
+++ b/stdlib/source/lux/tool/compiler/default/platform.lux
@@ -12,8 +12,7 @@
["." syntax]
["/." //
["." phase
- [analysis
- [macro (#+ Expander)]]
+ [macro (#+ Expander)]
["." translation]
["." statement]]
["." cli (#+ Configuration)]
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis.lux b/stdlib/source/lux/tool/compiler/phase/analysis.lux
index e9fd18a9d..917ea1632 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis.lux
@@ -15,9 +15,9 @@
["/." reference]
["/." case]
["/." function]
- ["/." macro (#+ Expander)]
["." //
- ["." extension]
+ ["//." macro (#+ Expander)]
+ ["//." extension]
[//
["." reference]
["/" analysis (#+ Analysis Operation Phase)]]]])
@@ -90,7 +90,7 @@
(/case.case compile input branches)
(^ (#.Form (list& [_ (#.Text extension-name)] extension-args)))
- (extension.apply compile [extension-name extension-args])
+ (//extension.apply compile [extension-name extension-args])
(^ (#.Form (list [_ (#.Tuple (list [_ (#.Identifier ["" function-name])]
[_ (#.Identifier ["" arg-name])]))]
@@ -104,11 +104,11 @@
(case functionA
(#/.Reference (#reference.Constant def-name))
(do @
- [?macro (extension.lift (macro.find-macro def-name))]
+ [?macro (//extension.lift (macro.find-macro def-name))]
(case ?macro
(#.Some macro)
(do @
- [expansion (extension.lift (/macro.expand-one expander def-name macro argsC+))]
+ [expansion (//extension.lift (//macro.expand-one expander def-name macro argsC+))]
(compile expansion))
_
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/macro.lux b/stdlib/source/lux/tool/compiler/phase/macro.lux
index aae26ada7..0aca19898 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/macro.lux
+++ b/stdlib/source/lux/tool/compiler/phase/macro.lux
@@ -2,7 +2,7 @@
[lux #*
[control
[monad (#+ do)]
- ["ex" exception (#+ exception:)]]
+ ["." exception (#+ exception:)]]
[data
["." error (#+ Error)]
["." text
@@ -12,20 +12,22 @@
["." list ("#/." functor)]]]
["." macro]
["." host (#+ import:)]]
- ["." ///])
+ ["." //])
(exception: #export (expansion-failed {macro Name} {inputs (List Code)} {error Text})
- (ex.report ["Macro" (%name macro)]
- ["Inputs" (|> inputs
- (list/map (|>> %code (format text.new-line text.tab)))
- (text.join-with ""))]
- ["Error" error]))
+ (exception.report
+ ["Macro" (%name macro)]
+ ["Inputs" (|> inputs
+ (list/map (|>> %code (format text.new-line text.tab)))
+ (text.join-with ""))]
+ ["Error" error]))
(exception: #export (must-have-single-expansion {macro Name} {inputs (List Code)})
- (ex.report ["Macro" (%name macro)]
- ["Inputs" (|> inputs
- (list/map (|>> %code (format text.new-line text.tab)))
- (text.join-with ""))]))
+ (exception.report
+ ["Macro" (%name macro)]
+ ["Inputs" (|> inputs
+ (list/map (|>> %code (format text.new-line text.tab)))
+ (text.join-with ""))]))
(import: #long java/lang/reflect/Method
(invoke [java/lang/Object (Array java/lang/Object)] #try java/lang/Object))
@@ -74,7 +76,7 @@
(#error.Success output)
(#error.Failure error)
- ((///.throw expansion-failed [name inputs error]) state)))))
+ ((//.throw expansion-failed [name inputs error]) state)))))
(def: #export (expand-one expander name macro inputs)
(-> Expander Name Macro (List Code) (Meta Code))
@@ -85,4 +87,4 @@
(wrap single)
_
- (///.throw must-have-single-expansion [name inputs]))))
+ (//.throw must-have-single-expansion [name inputs]))))
diff --git a/stdlib/source/lux/tool/compiler/phase/statement/total.lux b/stdlib/source/lux/tool/compiler/phase/statement/total.lux
index e1ba173ad..166425ffa 100644
--- a/stdlib/source/lux/tool/compiler/phase/statement/total.lux
+++ b/stdlib/source/lux/tool/compiler/phase/statement/total.lux
@@ -9,9 +9,9 @@
["." macro]]
["." // (#+ Phase)
["/." //
+ ["///." macro (#+ Expander)]
[".P" analysis
- ["." type]
- ["///." macro (#+ Expander)]]
+ ["." type]]
["." extension]
[//
["." analysis]]]])
diff --git a/stdlib/source/lux/tool/compiler/program.lux b/stdlib/source/lux/tool/compiler/program.lux
index 4194e0e8d..167f64221 100644
--- a/stdlib/source/lux/tool/compiler/program.lux
+++ b/stdlib/source/lux/tool/compiler/program.lux
@@ -16,8 +16,7 @@
[tool
[compiler
[phase
- [analysis
- [macro (#+ Expander)]]
+ [macro (#+ Expander)]
["." translation]
["." statement]]
[default