diff options
author | Eduardo Julian | 2022-03-15 07:24:35 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-03-15 07:24:35 -0400 |
commit | bc36487224f670c23002cc4575c0dba3e5dc1be1 (patch) | |
tree | 01601f7e5d992ace77a16cfa90240ffc4511a7af /lux-js/source/program.lux | |
parent | 4ef1ac1dfe0edd1a11bb7f1fd13c8b6cb8f1bab4 (diff) |
De-sigil-ification: ^
Diffstat (limited to '')
-rw-r--r-- | lux-js/source/program.lux | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index 2e74bf203..b6c278de6 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -23,6 +23,7 @@ [collection ["[0]" array {"+" Array}]]] [macro + ["^" pattern] ["[0]" template]] [math [number @@ -175,11 +176,11 @@ (org/openjdk/nashorn/api/scripting/AbstractJSObject [] (getMember self [member java/lang/String]) java/lang/Object (case (ffi.of_string member) - (^ (static runtime.i64_high_field)) + (pattern (static runtime.i64_high_field)) (|> value .nat runtime.high jvm_int (ffi.:as java/lang/Object)) - (^ (static runtime.i64_low_field)) + (pattern (static runtime.i64_low_field)) (|> value .nat runtime.low jvm_int (ffi.:as java/lang/Object)) @@ -260,7 +261,7 @@ [] (getMember self [member java/lang/String]) java/lang/Object (case (ffi.of_string member) - (^or "toJSON" "toString") + (^.or "toJSON" "toString") (|> (::toString value) (ffi.:as java/lang/Object)) @@ -274,12 +275,12 @@ (|> (::slice js_object value) (ffi.:as java/lang/Object)) - (^ (static runtime.variant_tag_field)) + (pattern (static runtime.variant_tag_field)) (|> value (array.read! 0) maybe.trusted) - (^ (static runtime.variant_flag_field)) + (pattern (static runtime.variant_flag_field)) (case (array.read! 1 value) {.#Some set!} set! @@ -287,7 +288,7 @@ _ (ffi.null)) - (^ (static runtime.variant_value_field)) + (pattern (static runtime.variant_value_field)) (|> value (array.read! 2) maybe.trusted @@ -351,9 +352,9 @@ (case [(org/openjdk/nashorn/api/scripting/JSObject::getMember [(ffi.as_string runtime.variant_tag_field)] js_object) (org/openjdk/nashorn/api/scripting/JSObject::getMember [(ffi.as_string runtime.variant_flag_field)] js_object) (org/openjdk/nashorn/api/scripting/JSObject::getMember [(ffi.as_string runtime.variant_value_field)] js_object)] - (^multi [{.#Some tag} ?flag {.#Some value}] - [[(ffi.check java/lang/Number tag) (lux_object value)] - [{.#Some tag} {try.#Success value}]]) + (^.multi [{.#Some tag} ?flag {.#Some value}] + [[(ffi.check java/lang/Number tag) (lux_object value)] + [{.#Some tag} {try.#Success value}]]) {.#Some [(java/lang/Number::intValue (:as java/lang/Number tag)) (maybe.else (ffi.null) ?flag) value]} |