aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation
diff options
context:
space:
mode:
authorEduardo Julian2017-11-15 20:57:47 -0400
committerEduardo Julian2017-11-15 20:57:47 -0400
commitb5c854fb5ac1ead274f4ae0c657da66df957f14e (patch)
treeb89035466363121a58e37c62f340c75a8c7dbeb7 /new-luxc/source/luxc/lang/translation
parent094c0904470f85ff0d63c788e07ce1ecf355577e (diff)
- Moved "luxc/lang/syntax" to "lux/lang/syntax".
- Minor refactoring.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation.lux12
1 files changed, 6 insertions, 6 deletions
diff --git a/new-luxc/source/luxc/lang/translation.lux b/new-luxc/source/luxc/lang/translation.lux
index e573aa3ae..88fc25d3a 100644
--- a/new-luxc/source/luxc/lang/translation.lux
+++ b/new-luxc/source/luxc/lang/translation.lux
@@ -9,6 +9,7 @@
(coll [dict]))
[meta]
(meta (type ["tc" check]))
+ (lang [syntax])
[host]
[io]
(world [file #+ File]))
@@ -18,7 +19,6 @@
[";L" host]
(host [";H" macro]
["$" jvm])
- ["&;" syntax]
(analysis [";A" expression]
[";A" common])
(synthesis [";S" expression])
@@ -41,7 +41,7 @@
(-> Code (Meta [$;Inst Code]))
(do meta;Monad<Meta>
[[_ annsA] (&;with-scope
- (&;with-expected-type Code
+ (&;with-type Code
(analyse annsC)))
annsI (expressionT;translate (expressionS;synthesize annsA))
annsV (evalT;eval annsI)]
@@ -58,7 +58,7 @@
[_ valueT valueA] (&;with-scope
(if (meta;type? (:! Code annsV))
(do @
- [valueA (&;with-expected-type Type
+ [valueA (&;with-type Type
(analyse valueC))]
(wrap [Type valueA]))
(commonA;with-unknown-type
@@ -73,7 +73,7 @@
(^code ("lux program" (~ [_ (#;Symbol ["" program-args])]) (~ programC)))
(do meta;Monad<Meta>
[[_ programA] (&;with-scope
- (&;with-expected-type (type (io;IO Unit))
+ (&;with-type (type (io;IO Unit))
(analyse programC)))
programI (expressionT;translate (expressionS;synthesize programA))]
(statementT;translate-program program-args programI))
@@ -111,7 +111,7 @@
((exhaust action) compiler')
(#e;Error error)
- (if (ex;match? &syntax;End-Of-File error)
+ (if (ex;match? syntax;End-Of-File error)
(#e;Success [compiler []])
(#e;Error error)))))
@@ -129,7 +129,7 @@
(def: (parse current-module)
(-> Text (Meta Code))
(function [compiler]
- (case (&syntax;parse current-module (get@ #;source compiler))
+ (case (syntax;parse current-module (get@ #;source compiler))
(#e;Error error)
(#e;Error error)