aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/lua
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/lua
parentfac2fa47c11db08596c890290bae09bf57a27089 (diff)
- WIP: - Initial PHP back-end implementation.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/lua')
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux58
1 files changed, 29 insertions, 29 deletions
diff --git a/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux
index 8be5667e9..cc267e7d5 100644
--- a/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux
@@ -75,35 +75,35 @@
(def: (lux-object host-object)
(-> Object (Error Top))
- (`` (cond (host.null? host-object)
- (ex.throw Null-Has-No-Lux-Representation "")
-
- (or (host.instance? java/lang/Boolean host-object)
- (host.instance? java/lang/Long host-object)
- (host.instance? java/lang/Double host-object)
- (host.instance? java/lang/String host-object))
- (ex.return host-object)
-
- (host.instance? ByteString host-object)
- (ex.return (ByteString::decode [] (:! ByteString host-object)))
-
- (host.instance? DefaultTable host-object)
- (let [host-object (:! DefaultTable host-object)]
- (case (variant lux-object host-object)
- (#.Some value)
- (ex.return value)
-
- #.None
- (case (array lux-object host-object)
- (#.Some value)
- (ex.return value)
-
- #.None
- (ex.throw Unknown-Kind-Of-Host-Object (format "SECOND " (Object::toString [] (:! Object host-object)))))))
-
- ## else
- (ex.throw Unknown-Kind-Of-Host-Object (format "FIRST " (Object::toString [] (:! Object host-object))))
- )))
+ (cond (host.null? host-object)
+ (ex.throw Null-Has-No-Lux-Representation "")
+
+ (or (host.instance? java/lang/Boolean host-object)
+ (host.instance? java/lang/Long host-object)
+ (host.instance? java/lang/Double host-object)
+ (host.instance? java/lang/String host-object))
+ (ex.return host-object)
+
+ (host.instance? ByteString host-object)
+ (ex.return (ByteString::decode [] (:! ByteString host-object)))
+
+ (host.instance? DefaultTable host-object)
+ (let [host-object (:! DefaultTable host-object)]
+ (case (variant lux-object host-object)
+ (#.Some value)
+ (ex.return value)
+
+ #.None
+ (case (array lux-object host-object)
+ (#.Some value)
+ (ex.return value)
+
+ #.None
+ (ex.throw Unknown-Kind-Of-Host-Object (format "SECOND " (Object::toString [] (:! Object host-object)))))))
+
+ ## else
+ (ex.throw Unknown-Kind-Of-Host-Object (format "FIRST " (Object::toString [] (:! Object host-object))))
+ ))
(def: #export (eval code)
(-> Expression (Meta Top))