From 787fc34a8f7c66746046a8ce0c16403cf6c2bf6c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 4 Apr 2018 00:56:16 -0400 Subject: - Initial Python back-end implementation. --- .../luxc/lang/translation/python/primitive.jvm.lux | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux (limited to 'new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux new file mode 100644 index 000000000..7b2ba1786 --- /dev/null +++ b/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux @@ -0,0 +1,28 @@ +(.module: + lux + (lux [macro "meta/" Monad]) + (luxc (lang (host [python #+ Expression Statement])))) + +(def: #export translate-bool + (-> Bool (Meta Expression)) + (|>> python.bool meta/wrap)) + +(def: #export translate-int + (-> Int (Meta Expression)) + (|>> python.int meta/wrap)) + +(def: #export translate-nat + (-> Nat (Meta Expression)) + (|>> (:! Int) python.int meta/wrap)) + +(def: #export translate-deg + (-> Deg (Meta Expression)) + (|>> (:! Int) python.int meta/wrap)) + +(def: #export translate-frac + (-> Frac (Meta Expression)) + (|>> python.float meta/wrap)) + +(def: #export translate-text + (-> Text (Meta Expression)) + (|>> python.string meta/wrap)) -- cgit v1.2.3