diff options
author | Eduardo Julian | 2020-05-30 15:19:28 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-05-30 15:19:28 -0400 |
commit | b4d0eba7485caf0c6cf58de1193a9114fa273d8b (patch) | |
tree | f6f7fa2967bb5923347db1ed1d4c9b08e56bf8c6 /new-luxc/source/luxc/lang/translation/r/reference.jvm.lux | |
parent | 6eaa3b57f3f1ea2ce13b942bdb4ef502fc1729bc (diff) |
Split new-luxc into lux-jvm and lux-r.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/r/reference.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/r/reference.jvm.lux | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/new-luxc/source/luxc/lang/translation/r/reference.jvm.lux b/new-luxc/source/luxc/lang/translation/r/reference.jvm.lux deleted file mode 100644 index 7de1c74ee..000000000 --- a/new-luxc/source/luxc/lang/translation/r/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 [r #+ Expression SVar @@]))) - [//] - (// [".T" runtime])) - -(template [<register> <translation> <prefix>] - [(def: #export (<register> register) - (-> Register SVar) - (r.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 r.var)) - -(def: #export (translate-definition name) - (-> Name (Meta Expression)) - (:: macro.Monad<Meta> wrap (@@ (global name)))) |