diff options
author | Eduardo Julian | 2018-08-02 23:23:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-08-02 23:23:20 -0400 |
commit | a8979a7b1ed69740eb6c7c00c934e2fadd129322 (patch) | |
tree | a32b39006ed7143c322b2171989850fd1f33499e /stdlib | |
parent | 015134cd44e066e49b3bac56b442a6150c782600 (diff) |
Moved statement-state initialization o "lux/compiler/default/init".
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/compiler/default/init.lux | 43 | ||||
-rw-r--r-- | stdlib/source/lux/compiler/default/phase/statement.lux | 35 |
2 files changed, 40 insertions, 38 deletions
diff --git a/stdlib/source/lux/compiler/default/init.lux b/stdlib/source/lux/compiler/default/init.lux index 3bfba340b..d768f5f7d 100644 --- a/stdlib/source/lux/compiler/default/init.lux +++ b/stdlib/source/lux/compiler/default/init.lux @@ -1,7 +1,20 @@ (.module: lux - [/// - ["." host]]) + [// + [phase (#+ Eval) + [analysis + [".A" expression]] + ["." synthesis + [".S" expression]] + ["." translation (#+ Host)] + ["." statement] + ["." extension + [".E" analysis] + [".E" synthesis] + [".E" translation] + [".E" statement]]] + [// + ["." host]]]) (type: #export Version Text) @@ -25,9 +38,9 @@ #.var-counter 0 #.var-bindings (list)}) -(`` (def: #export info - Info - {#.target (for {(~~ (static host.common-lisp)) host.common-lisp +(def: #export info + Info + {#.target (`` (for {(~~ (static host.common-lisp)) host.common-lisp (~~ (static host.js)) host.js (~~ (static host.jvm)) host.jvm (~~ (static host.lua)) host.lua @@ -35,9 +48,9 @@ (~~ (static host.python)) host.python (~~ (static host.r)) host.r (~~ (static host.ruby)) host.ruby - (~~ (static host.scheme)) host.scheme}) - #.version ..version - #.mode #.Build})) + (~~ (static host.scheme)) host.scheme})) + #.version ..version + #.mode #.Build}) (def: #export (compiler host) (-> Any Lux) @@ -53,3 +66,17 @@ #.scope-type-vars (list) #.extensions [] #.host host}) + +(def: #export (state eval translate host) + (All [anchor expression statement] + (-> Eval + (translation.Phase anchor expression statement) + (Host expression statement) + (statement.State+ anchor expression statement))) + [statementE.bundle + {#statement.analysis {#statement.state [analysisE.bundle (..compiler [])] + #statement.phase (expressionA.analyser eval)} + #statement.synthesis {#statement.state [synthesisE.bundle synthesis.init] + #statement.phase expressionS.synthesize} + #statement.translation {#statement.state [translationE.bundle (translation.state host)] + #statement.phase translate}}]) diff --git a/stdlib/source/lux/compiler/default/phase/statement.lux b/stdlib/source/lux/compiler/default/phase/statement.lux index 638f29b80..8b0876cdd 100644 --- a/stdlib/source/lux/compiler/default/phase/statement.lux +++ b/stdlib/source/lux/compiler/default/phase/statement.lux @@ -1,20 +1,10 @@ (.module: [lux #*] - [// (#+ Eval) - ["." analysis - [".A" expression]] - ["." synthesis - [".S" expression]] - ["." translation (#+ Host)] - ["." extension - ["." bundle] - [".E" analysis] - [".E" synthesis] - [".E" translation] - ## [".E" statement] - ] - [// - ["." init]]]) + [// + ["." analysis] + ["." synthesis] + ["." translation] + ["." extension]]) (type: #export (Component state phase) {#state state @@ -38,18 +28,3 @@ [Handler extension.Handler] [Bundle extension.Bundle] ) - -(def: #export (state eval translate host) - (All [anchor expression statement] - (-> Eval - (translation.Phase anchor expression statement) - (Host expression statement) - (..State+ anchor expression statement))) - [bundle.empty - ## statementE.bundle - {#analysis {#state [analysisE.bundle (init.compiler [])] - #phase (expressionA.analyser eval)} - #synthesis {#state [synthesisE.bundle synthesis.init] - #phase expressionS.synthesize} - #translation {#state [translationE.bundle (translation.state host)] - #phase translate}}]) |