aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation.lux64
1 files changed, 24 insertions, 40 deletions
diff --git a/new-luxc/source/luxc/lang/translation.lux b/new-luxc/source/luxc/lang/translation.lux
index 30c4ec33c..8c42c2a71 100644
--- a/new-luxc/source/luxc/lang/translation.lux
+++ b/new-luxc/source/luxc/lang/translation.lux
@@ -27,22 +27,18 @@
[".L" macro]
[".L" extension]
[".L" init]
- (extension [".E" analysis]
- [".E" synthesis]
- [".E" translation]
- [".E" statement])
(host ["$" jvm])
(analysis [".A" expression]
[".A" common])
(synthesis [".S" expression])
["&." eval]))
- (/ [js]
- (js [".T" runtime]
- [".T" statement]
- ## [".T" common #+ Artifacts]
- [".T" expression]
- [".T" eval]
- [".T" imports])))
+ (/ ## [js]
+ (jvm [".T" runtime]
+ [".T" statement]
+ [".T" common #+ Artifacts]
+ [".T" expression]
+ [".T" eval]
+ [".T" imports])))
(def: analyse
(&.Analyser)
@@ -53,8 +49,8 @@
(exception: #export Invalid-Macro)
(def: (process-annotations annsC)
- (-> Code (Meta [js.Expression
- ## $.Inst
+ (-> Code (Meta [## js.Expression
+ $.Inst
Code]))
(do macro.Monad<Meta>
[[_ annsA] (&.with-scope
@@ -242,39 +238,27 @@
(def: (initialize sources target)
(-> (List File) File (Process Compiler))
(do io.Monad<Process>
- [compiler (case (runtimeT.translate (initL.compiler (io.run js.init))
- ## (initL.compiler (io.run hostL.init-host))
+ [compiler (case (runtimeT.translate ## (initL.compiler (io.run js.init))
+ (initL.compiler (io.run hostL.init-host))
)
- (#e.Success [compiler disk-write])
- (do @
- [_ (&io.prepare-target target)
- _ disk-write
- ## _ (cache/io.pre-load sources target (commonT.load-definition compiler))
- ]
- (wrap (|> compiler
- (set@ [#.info #.mode] #.Build)
- (set@ #.extensions
- (:! Void
- {#extensionL.analysis analysisE.defaults
- #extensionL.synthesis synthesisE.defaults
- #extensionL.translation translationE.defaults
- #extensionL.statement statementE.defaults})))))
-
- ## (#e.Success [compiler [runtime-bc function-bc]])
+ ## (#e.Success [compiler disk-write])
## (do @
## [_ (&io.prepare-target target)
- ## ## _ (&io.write target (format hostL.runtime-class ".class") runtime-bc)
- ## ## _ (&io.write target (format hostL.function-class ".class") function-bc)
+ ## _ disk-write
## ## _ (cache/io.pre-load sources target (commonT.load-definition compiler))
## ]
## (wrap (|> compiler
- ## (set@ [#.info #.mode] #.Build)
- ## (set@ #.extensions
- ## (:! Void
- ## {#extensionL.analysis analysisE.defaults
- ## #extensionL.synthesis synthesisE.defaults
- ## #extensionL.translation translationE.defaults
- ## #extensionL.statement statementE.defaults})))))
+ ## (set@ [#.info #.mode] #.Build))))
+
+ (#e.Success [compiler [runtime-bc function-bc]])
+ (do @
+ [_ (&io.prepare-target target)
+ ## _ (&io.write target (format hostL.runtime-class ".class") runtime-bc)
+ ## _ (&io.write target (format hostL.function-class ".class") function-bc)
+ ## _ (cache/io.pre-load sources target (commonT.load-definition compiler))
+ ]
+ (wrap (|> compiler
+ (set@ [#.info #.mode] #.Build))))
(#e.Error error)
(io.fail error))]