diff options
author | Eduardo Julian | 2018-02-24 01:03:03 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-02-24 01:03:03 -0400 |
commit | cabb410d67edcdcb3531a990518ca67de4507f07 (patch) | |
tree | 1cfca0f79dae0a095503b883426fc8e09abc4cdd /new-luxc/source/luxc/lang/host | |
parent | 0bd93d82eb7a50b9ce8be42800c388e87e6ca9bf (diff) |
- Fixed nat division and remainder.
Diffstat (limited to 'new-luxc/source/luxc/lang/host')
-rw-r--r-- | new-luxc/source/luxc/lang/host/js.lux | 11 |
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 "|"] |