diff options
author | Eduardo Julian | 2021-08-09 23:02:01 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-09 23:02:01 -0400 |
commit | 464b6e8f5e6c62f58fa8c7ff61ab2ad215e98bd1 (patch) | |
tree | 1ae9d95956cee4251cd29a3e24c246c4360d567d /lux-js | |
parent | f621a133e6e0a516c0586270fea8eaffb4829d82 (diff) |
Improved single-line comment syntax (from "##" to "...").
Diffstat (limited to 'lux-js')
-rw-r--r-- | lux-js/source/program.lux | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index 46c94f29f..bc1e6b928 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -159,7 +159,7 @@ (-> Int org/openjdk/nashorn/api/scripting/JSObject) (ffi.object [] org/openjdk/nashorn/api/scripting/AbstractJSObject [program/IntValue] [] - ## Methods + ... Methods (program/IntValue [] (getValue self) java/lang/Object (:as java/lang/Object value)) @@ -216,11 +216,11 @@ (#.Some sub_value) (|> sub_value (:as Int) js_int) #.None) - ## else + ... else (:as org/openjdk/nashorn/api/scripting/JSObject sub_value))))] (ffi.object [] org/openjdk/nashorn/api/scripting/AbstractJSObject [program/StructureValue] [] - ## Methods + ... Methods (program/StructureValue [] (getValue self) java/lang/Object (:as (Array java/lang/Object) value)) @@ -385,10 +385,10 @@ #.None (if (org/openjdk/nashorn/api/scripting/JSObject::isFunction js_object) (exception.return js_object) - ## (exception.throw ..unknown_kind_of_host_object (:as java/lang/Object js_object)) + ... (exception.throw ..unknown_kind_of_host_object (:as java/lang/Object js_object)) (exception.return js_object))))) #.None) - ## else + ... else (exception.throw ..unknown_kind_of_host_object (:as java/lang/Object js_object)) ))) @@ -501,9 +501,9 @@ @.js (as_is (def: (eval code) (-> Text (Try (Maybe Any))) - ## Note: I have to call "eval" this way - ## in order to avoid a quirk of calling eval in Node - ## when the code is running under "use strict";. + ... Note: I have to call "eval" this way + ... in order to avoid a quirk of calling eval in Node + ... when the code is running under "use strict";. (try (let [return ("js apply" (function.identity ("js constant" "eval")) code)] (if ("js object null?" return) #.None @@ -562,11 +562,11 @@ (do phase.monad [] (wrap (:as platform.Phase_Wrapper - (for {## The implementation for @.old is technically incorrect. - ## However, the JS compiler runs fast enough on Node to be fully hosted there. - ## And running the JS compiler on the JVM (on top of Nashorn) is impractically slow. - ## This means that in practice, only the @.js implementation matters. - ## And since no cross-language boundary needs to be handled, it's a correct implementation. + (for {... The implementation for @.old is technically incorrect. + ... However, the JS compiler runs fast enough on Node to be fully hosted there. + ... And running the JS compiler on the JVM (on top of Nashorn) is impractically slow. + ... This means that in practice, only the @.js implementation matters. + ... And since no cross-language boundary needs to be handled, it's a correct implementation. @.old (|>>) @.js (|>>)}))))) @@ -603,7 +603,7 @@ (for {@.old (def: (extender phase_wrapper) (-> platform.Phase_Wrapper Extender) - ## TODO: Stop relying on coercions ASAP. + ... TODO: Stop relying on coercions ASAP. (<| (:as Extender) (function (@self handler)) (:as Handler) |