diff options
author | Eduardo Julian | 2022-06-05 01:39:29 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-05 01:39:29 -0400 |
commit | f623de52d76ad8ec96feb048cd95a3fb150717e1 (patch) | |
tree | 92a53eb8e5a25287e59eb104716abe5cc2ebd60a /stdlib/source/library/lux/data/text.lux | |
parent | 75e8244fd7914d2ac0c3622d2277b84c4bfa7ffb (diff) |
De-sigil-ification: : [Part 1]
Diffstat (limited to 'stdlib/source/library/lux/data/text.lux')
-rw-r--r-- | stdlib/source/library/lux/data/text.lux | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux index ecc17837e..8e9eccac7 100644 --- a/stdlib/source/library/lux/data/text.lux +++ b/stdlib/source/library/lux/data/text.lux @@ -184,29 +184,31 @@ [[pre post] (..split_by pattern template)] (in (all "lux text concat" pre replacement post))))) -(for @.js (these (macro: (defined? tokens lux) - (case tokens - (pattern (list it)) - {.#Right [lux (list (` (.case ("js type-of" ("js constant" (~ it))) - "undefined" - .false - - (~' _) - .true)))]} - - _ - {.#Left ""})) - (macro: (if_nashorn tokens lux) - (case tokens - (pattern (list then else)) - {.#Right [lux (list (if (and (..defined? "java") - (..defined? "java.lang") - (..defined? "java.lang.Object")) - then - else))]} - - _ - {.#Left ""}))) +(for @.js (these (def: defined? + (macro (_ tokens lux) + (case tokens + (pattern (list it)) + {.#Right [lux (list (` (.case ("js type-of" ("js constant" (~ it))) + "undefined" + .false + + (~' _) + .true)))]} + + _ + {.#Left ""}))) + (def: if_nashorn + (macro (_ tokens lux) + (case tokens + (pattern (list then else)) + {.#Right [lux (list (if (and (..defined? "java") + (..defined? "java.lang") + (..defined? "java.lang.Object")) + then + else))]} + + _ + {.#Left ""})))) (these)) (def: .public (replaced pattern replacement template) |