aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/host
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/host/js.lux11
1 files changed, 9 insertions, 2 deletions
diff --git a/new-luxc/source/luxc/lang/host/js.lux b/new-luxc/source/luxc/lang/host/js.lux
index b4c5acd58..7ef948abb 100644
--- a/new-luxc/source/luxc/lang/host/js.lux
+++ b/new-luxc/source/luxc/lang/host/js.lux
@@ -47,7 +47,7 @@
(list/fold (.function [[test then!] next!]
(if! test then! next!))
else!
- clauses))
+ (list.reverse clauses)))
(def: #export (block! statements)
(-> (List Statement) Statement)
@@ -89,7 +89,7 @@
(-> Expression Expression Expression)
(format "(" subject " " <op> " " param ")"))]
- [= "="]
+ [= "==="]
[< "<"]
[<= "<="]
[> ">"]
@@ -99,6 +99,13 @@
[* "*"]
[/ "/"]
[% "%"]
+ )
+
+(do-template [<name> <op>]
+ [(def: #export (<name> param subject)
+ (-> Expression Expression Expression)
+ (format "(" param " " <op> " " subject ")"))]
+
[or "||"]
[and "&&"]
[bit-or "|"]