aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/python/reference.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-03-26 19:22:42 -0400
committerEduardo Julian2019-03-26 19:22:42 -0400
commit5ce3411d68cf11daa0ff3e5171afced429696480 (patch)
tree03c923233d24623e0c9dfed53acc91b64b5ed683 /new-luxc/source/luxc/lang/translation/python/reference.jvm.lux
parent91cd93a50347d39c286366c32c723fd861c5975e (diff)
WIP: Moved Python code-generation machinery over to stdlib.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/python/reference.jvm.lux42
1 files changed, 0 insertions, 42 deletions
diff --git a/new-luxc/source/luxc/lang/translation/python/reference.jvm.lux b/new-luxc/source/luxc/lang/translation/python/reference.jvm.lux
deleted file mode 100644
index e8bcae522..000000000
--- a/new-luxc/source/luxc/lang/translation/python/reference.jvm.lux
+++ /dev/null
@@ -1,42 +0,0 @@
-(.module:
- lux
- (lux [macro]
- (data [text]
- text/format))
- (luxc ["&" lang]
- (lang [".L" variable #+ Variable Register]
- (host [python #+ Expression Statement SVar @@])))
- [//]
- (// [".T" runtime]))
-
-(do-template [<register> <translation> <prefix>]
- [(def: #export (<register> register)
- (-> Register SVar)
- (python.var (format <prefix> (%i (.int register)))))
-
- (def: #export (<translation> register)
- (-> Register (Meta Expression))
- (:: macro.Monad<Meta> wrap (@@ (<register> register))))]
-
- [closure translate-captured "c"]
- [variable translate-local "v"])
-
-(def: #export (local var)
- (-> Variable SVar)
- (if (variableL.captured? var)
- (closure (variableL.captured-register var))
- (variable (.nat var))))
-
-(def: #export (translate-variable var)
- (-> Variable (Meta Expression))
- (if (variableL.captured? var)
- (translate-captured (variableL.captured-register var))
- (translate-local (.nat var))))
-
-(def: #export global
- (-> Name SVar)
- (|>> //.definition-name python.var))
-
-(def: #export (translate-definition name)
- (-> Name (Meta Expression))
- (:: macro.Monad<Meta> wrap (@@ (global name))))