aboutsummaryrefslogtreecommitdiff
path: root/luxc/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--luxc/src/lux/compiler/js/lux.clj11
1 files changed, 7 insertions, 4 deletions
diff --git a/luxc/src/lux/compiler/js/lux.clj b/luxc/src/lux/compiler/js/lux.clj
index 4e7ddd8fd..2de9eeec1 100644
--- a/luxc/src/lux/compiler/js/lux.clj
+++ b/luxc/src/lux/compiler/js/lux.clj
@@ -178,19 +178,22 @@
(return (str "if(" cursor-peek " !== " _value ") { " pm-fail " }"))
(&o/$NatPM _value)
- (return (str "if(" cursor-peek " !== " _value ") { " pm-fail " }"))
+ (|do [=value (compile-nat _value)]
+ (return (str "if(" (str "LuxRT.eqI64(" cursor-peek "," _value ")") ") { " pm-fail " }")))
(&o/$IntPM _value)
- (return (str "if(" cursor-peek " !== " _value ") { " pm-fail " }"))
+ (|do [=value (compile-int _value)]
+ (return (str "if(" (str "LuxRT.eqI64(" cursor-peek "," _value ")") ") { " pm-fail " }")))
(&o/$DegPM _value)
- (return (str "if(" cursor-peek " !== " _value ") { " pm-fail " }"))
+ (|do [=value (compile-deg _value)]
+ (return (str "if(" (str "LuxRT.eqI64(" cursor-peek "," _value ")") ") { " pm-fail " }")))
(&o/$RealPM _value)
(return (str "if(" cursor-peek " !== " _value ") { " pm-fail " }"))
(&o/$CharPM _value)
- (return (str "if(" cursor-peek " !== " (pr-str (str _value)) ") { " pm-fail " }"))
+ (return (str "if(" (str "(" cursor-peek ").C") " !== " (pr-str (str _value)) ") { " pm-fail " }"))
(&o/$TextPM _value)
(return (str "if(" cursor-peek " !== " (pr-str _value) ") { " pm-fail " }"))