diff options
author | Eduardo Julian | 2017-04-06 20:19:34 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-04-06 20:19:34 -0400 |
commit | 6aa989b62f71179bdbad2d9d04110ee3d010c838 (patch) | |
tree | 8af0cc3a02754080e74e9448a88cbf0d8f228089 /stdlib/source/lux.lux | |
parent | 402919654d174235512851a9907c54c092df0b7f (diff) |
- Renamed lux/data/text;replace to replace-all.
- Did some refactorings for lexers.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 557992ba4..98325ae30 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -3962,7 +3962,7 @@ #import-refer {#refer-defs _referrals #refer-open _openings}}))))) -(def: (replace pattern value template) +(def: (replace-all pattern value template) (-> Text Text Text Text) (_lux_proc ["text" "replace-all"] [template pattern value])) @@ -4028,7 +4028,7 @@ openings+extra (parse-short-openings extra) #let [[openings extra] openings+extra]] (wrap (list {#import-name m-name - #import-alias (#;Some (replace ";" m-name alias)) + #import-alias (#;Some (replace-all ";" m-name alias)) #import-refer {#refer-defs referral #refer-open openings}}))) @@ -4922,14 +4922,14 @@ (def: (Text/encode original) (-> Text Text) (let [escaped (|> original - (replace "\t" "\\t") - (replace "\v" "\\v") - (replace "\b" "\\b") - (replace "\n" "\\n") - (replace "\r" "\\r") - (replace "\f" "\\f") - (replace "\"" "\\\"") - (replace "\\" "\\\\") + (replace-all "\t" "\\t") + (replace-all "\v" "\\v") + (replace-all "\b" "\\b") + (replace-all "\n" "\\n") + (replace-all "\r" "\\r") + (replace-all "\f" "\\f") + (replace-all "\"" "\\\"") + (replace-all "\\" "\\\\") )] ($_ Text/append "\"" escaped "\""))) |