aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/compiler/default/phase/analysis.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-07-21 02:10:54 -0400
committerEduardo Julian2018-07-21 02:10:54 -0400
commit660c7fe6af927c6e668a86e44fd2f0a9b1fb8b8b (patch)
tree3110462b0bca61fd2f9082b1c352bd5346b11662 /stdlib/source/lux/compiler/default/phase/analysis.lux
parent76e97634aaab09c89a895a6f6e863d10479821d1 (diff)
- Re-named "Compiler" to "Phase".
- Re-structured the compiler infrastructure.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/compiler/default/phase/analysis.lux (renamed from stdlib/source/lux/language/compiler/analysis.lux)34
1 files changed, 17 insertions, 17 deletions
diff --git a/stdlib/source/lux/language/compiler/analysis.lux b/stdlib/source/lux/compiler/default/phase/analysis.lux
index 4b8a19c66..182e3c321 100644
--- a/stdlib/source/lux/language/compiler/analysis.lux
+++ b/stdlib/source/lux/compiler/default/phase/analysis.lux
@@ -54,8 +54,8 @@
(type: #export Operation
(extension.Operation .Lux Code Analysis))
-(type: #export Compiler
- (extension.Compiler .Lux Code Analysis))
+(type: #export Phase
+ (extension.Phase .Lux Code Analysis))
(type: #export Handler
(extension.Handler .Lux .Code Analysis))
@@ -226,14 +226,14 @@
(def: #export (with-source-code source action)
(All [a] (-> Source (Operation a) (Operation a)))
- (function (_ [bundle compiler])
- (let [old-source (get@ #.source compiler)]
- (case (action [bundle (set@ #.source source compiler)])
+ (function (_ [bundle state])
+ (let [old-source (get@ #.source state)]
+ (case (action [bundle (set@ #.source source state)])
(#error.Error error)
(#error.Error error)
- (#error.Success [[bundle' compiler'] output])
- (#error.Success [[bundle' (set@ #.source old-source compiler')]
+ (#error.Success [[bundle' state'] output])
+ (#error.Success [[bundle' (set@ #.source old-source state')]
output])))))
(def: fresh-bindings
@@ -250,15 +250,15 @@
(def: #export (with-scope action)
(All [a] (-> (Operation a) (Operation [Scope a])))
- (function (_ [bundle compiler])
- (case (action [bundle (update@ #.scopes (|>> (#.Cons fresh-scope)) compiler)])
- (#error.Success [[bundle' compiler'] output])
- (case (get@ #.scopes compiler')
+ (function (_ [bundle state])
+ (case (action [bundle (update@ #.scopes (|>> (#.Cons fresh-scope)) state)])
+ (#error.Success [[bundle' state'] output])
+ (case (get@ #.scopes state')
#.Nil
(#error.Error "Impossible error: Drained scopes!")
(#.Cons head tail)
- (#error.Success [[bundle' (set@ #.scopes tail compiler')]
+ (#error.Success [[bundle' (set@ #.scopes tail state')]
[head output]]))
(#error.Error error)
@@ -274,11 +274,11 @@
(All [a] (-> Cursor (Operation a) (Operation a)))
(if (text/= "" (product.left cursor))
action
- (function (_ [bundle compiler])
- (let [old-cursor (get@ #.cursor compiler)]
- (case (action [bundle (set@ #.cursor cursor compiler)])
- (#error.Success [[bundle' compiler'] output])
- (#error.Success [[bundle' (set@ #.cursor old-cursor compiler')]
+ (function (_ [bundle state])
+ (let [old-cursor (get@ #.cursor state)]
+ (case (action [bundle (set@ #.cursor cursor state)])
+ (#error.Success [[bundle' state'] output])
+ (#error.Success [[bundle' (set@ #.cursor old-cursor state')]
output])
(#error.Error error)