aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-04-27 19:46:44 -0400
committerEduardo Julian2018-04-27 19:46:44 -0400
commitf8d6348b3fec0c55768ebcd8dba446949b8a4ef7 (patch)
tree26aa0a2cc6309cfc6cba5b23d6a68f68934e40a4 /new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux
parentfac2fa47c11db08596c890290bae09bf57a27089 (diff)
- WIP: - Initial PHP back-end implementation.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux20
1 files changed, 20 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux
new file mode 100644
index 000000000..61570143b
--- /dev/null
+++ b/new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux
@@ -0,0 +1,20 @@
+(.module:
+ lux
+ (lux [macro "meta/" Monad<Meta>])
+ (luxc (lang (host ["_" php #+ CExpression]))))
+
+(def: #export translate-bool
+ (-> Bool (Meta CExpression))
+ (|>> _.bool meta/wrap))
+
+(def: #export translate-int
+ (-> Int (Meta CExpression))
+ (|>> _.int meta/wrap))
+
+(def: #export translate-frac
+ (-> Frac (Meta CExpression))
+ (|>> _.float meta/wrap))
+
+(def: #export translate-text
+ (-> Text (Meta CExpression))
+ (|>> _.string meta/wrap))