From 5ce3411d68cf11daa0ff3e5171afced429696480 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 26 Mar 2019 19:22:42 -0400 Subject: WIP: Moved Python code-generation machinery over to stdlib. --- .../luxc/lang/translation/python/reference.jvm.lux | 42 ---------------------- 1 file changed, 42 deletions(-) delete mode 100644 new-luxc/source/luxc/lang/translation/python/reference.jvm.lux (limited to 'new-luxc/source/luxc/lang/translation/python/reference.jvm.lux') 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 [ ] - [(def: #export ( register) - (-> Register SVar) - (python.var (format (%i (.int register))))) - - (def: #export ( register) - (-> Register (Meta Expression)) - (:: macro.Monad wrap (@@ ( 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 wrap (@@ (global name)))) -- cgit v1.2.3