aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux.lux2
-rw-r--r--stdlib/source/lux/compiler/default/name.lux2
-rw-r--r--stdlib/source/lux/compiler/default/syntax.lux2
-rw-r--r--stdlib/source/lux/data/format/json.lux20
-rw-r--r--stdlib/source/lux/data/text/regex.lux74
5 files changed, 50 insertions, 50 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index 0417c9a4d..bfbfe0678 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -5285,7 +5285,7 @@
"## Creates code documentation, embedding text as comments and properly formatting the forms it's being given."
__paragraph
"## For Example:" ..new-line
- "(doc ''Allows arbitrary looping, using the \\''recur\\'' form to re-start the loop.''" ..new-line
+ "(doc ''Allows arbitrary looping, using the 'recur' form to re-start the loop.''" ..new-line
" ''Can be used in monadic code to create monadic loops.''" ..new-line
" (loop [count +0" ..new-line
" x init]" ..new-line
diff --git a/stdlib/source/lux/compiler/default/name.lux b/stdlib/source/lux/compiler/default/name.lux
index ddbf9ee8f..925b0585d 100644
--- a/stdlib/source/lux/compiler/default/name.lux
+++ b/stdlib/source/lux/compiler/default/name.lux
@@ -12,7 +12,7 @@
(^ (char "+")) "_PLUS_"
(^ (char "-")) "_DASH_"
(^ (char "/")) "_SLASH_"
- (^ (char "\\")) "_BSLASH_"
+ (^ (char "\")) "_BSLASH_"
(^ (char "_")) "_UNDERS_"
(^ (char "%")) "_PERCENT_"
(^ (char "$")) "_DOLLAR_"
diff --git a/stdlib/source/lux/compiler/default/syntax.lux b/stdlib/source/lux/compiler/default/syntax.lux
index 92f223940..778588959 100644
--- a/stdlib/source/lux/compiler/default/syntax.lux
+++ b/stdlib/source/lux/compiler/default/syntax.lux
@@ -73,7 +73,7 @@
(def: #export open-record "{")
(def: #export close-record "}")
-(def: escape "\\")
+(def: escape "\")
(def: #export sigil "#")
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index 9189b375f..20f059503 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -452,29 +452,29 @@
(def: escaped~
(l.Lexer Text)
($_ p.either
- (p.after (l.this "\\t")
+ (p.after (l.this "\t")
(parser/wrap text.tab))
- (p.after (l.this "\\b")
+ (p.after (l.this "\b")
(parser/wrap text.back-space))
- (p.after (l.this "\\n")
+ (p.after (l.this "\n")
(parser/wrap text.new-line))
- (p.after (l.this "\\r")
+ (p.after (l.this "\r")
(parser/wrap text.carriage-return))
- (p.after (l.this "\\f")
+ (p.after (l.this "\f")
(parser/wrap text.form-feed))
- (p.after (l.this (text/compose "\\" text.double-quote))
+ (p.after (l.this (text/compose "\" text.double-quote))
(parser/wrap text.double-quote))
- (p.after (l.this "\\\\")
- (parser/wrap "\\"))))
+ (p.after (l.this "\\")
+ (parser/wrap "\"))))
(def: string~
(l.Lexer String)
(<| (l.enclosed [text.double-quote text.double-quote])
(loop [_ []])
(do p.Monad<Parser>
- [chars (l.some (l.none-of (text/compose "\\" text.double-quote)))
+ [chars (l.some (l.none-of (text/compose "\" text.double-quote)))
stop l.peek])
- (if (text/= "\\" stop)
+ (if (text/= "\" stop)
(do @
[escaped escaped~
next-chars (recur [])]
diff --git a/stdlib/source/lux/data/text/regex.lux b/stdlib/source/lux/data/text/regex.lux
index ec11c9259..ba0128b7b 100644
--- a/stdlib/source/lux/data/text/regex.lux
+++ b/stdlib/source/lux/data/text/regex.lux
@@ -20,12 +20,12 @@
## [Utils]
(def: regex-char^
(l.Lexer Text)
- (l.none-of "\\.|&()[]{}"))
+ (l.none-of "\.|&()[]{}"))
(def: escaped-char^
(l.Lexer Text)
(do p.Monad<Parser>
- [? (l.this? "\\")]
+ [? (l.this? "\")]
(if ?
l.any
regex-char^)))
@@ -75,7 +75,7 @@
(def: (re-var^ current-module)
(-> Text (l.Lexer Code))
(do p.Monad<Parser>
- [name (l.enclosed ["\\@<" ">"] (name^ current-module))]
+ [name (l.enclosed ["\@<" ">"] (name^ current-module))]
(wrap (` (: (l.Lexer Text) (~ (code.identifier name)))))))
(def: re-range^
@@ -135,7 +135,7 @@
(def: punct^
(l.Lexer Text)
- (l.one-of (format "!#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
+ (l.one-of (format "!#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
//.double-quote)))
(def: graph^
@@ -153,27 +153,27 @@
[]
($_ p.either
(p.after (l.this ".") (wrap (` l.any)))
- (p.after (l.this "\\d") (wrap (` l.decimal)))
- (p.after (l.this "\\D") (wrap (` (l.not l.decimal))))
- (p.after (l.this "\\s") (wrap (` l.space)))
- (p.after (l.this "\\S") (wrap (` (l.not l.space))))
- (p.after (l.this "\\w") (wrap (` (~! word^))))
- (p.after (l.this "\\W") (wrap (` (l.not (~! word^)))))
-
- (p.after (l.this "\\p{Lower}") (wrap (` l.lower)))
- (p.after (l.this "\\p{Upper}") (wrap (` l.upper)))
- (p.after (l.this "\\p{Alpha}") (wrap (` l.alpha)))
- (p.after (l.this "\\p{Digit}") (wrap (` l.decimal)))
- (p.after (l.this "\\p{Alnum}") (wrap (` l.alpha-num)))
- (p.after (l.this "\\p{Space}") (wrap (` l.space)))
- (p.after (l.this "\\p{HexDigit}") (wrap (` l.hexadecimal)))
- (p.after (l.this "\\p{OctDigit}") (wrap (` l.octal)))
- (p.after (l.this "\\p{Blank}") (wrap (` (~! blank^))))
- (p.after (l.this "\\p{ASCII}") (wrap (` (~! ascii^))))
- (p.after (l.this "\\p{Contrl}") (wrap (` (~! control^))))
- (p.after (l.this "\\p{Punct}") (wrap (` (~! punct^))))
- (p.after (l.this "\\p{Graph}") (wrap (` (~! graph^))))
- (p.after (l.this "\\p{Print}") (wrap (` (~! print^))))
+ (p.after (l.this "\d") (wrap (` l.decimal)))
+ (p.after (l.this "\D") (wrap (` (l.not l.decimal))))
+ (p.after (l.this "\s") (wrap (` l.space)))
+ (p.after (l.this "\S") (wrap (` (l.not l.space))))
+ (p.after (l.this "\w") (wrap (` (~! word^))))
+ (p.after (l.this "\W") (wrap (` (l.not (~! word^)))))
+
+ (p.after (l.this "\p{Lower}") (wrap (` l.lower)))
+ (p.after (l.this "\p{Upper}") (wrap (` l.upper)))
+ (p.after (l.this "\p{Alpha}") (wrap (` l.alpha)))
+ (p.after (l.this "\p{Digit}") (wrap (` l.decimal)))
+ (p.after (l.this "\p{Alnum}") (wrap (` l.alpha-num)))
+ (p.after (l.this "\p{Space}") (wrap (` l.space)))
+ (p.after (l.this "\p{HexDigit}") (wrap (` l.hexadecimal)))
+ (p.after (l.this "\p{OctDigit}") (wrap (` l.octal)))
+ (p.after (l.this "\p{Blank}") (wrap (` (~! blank^))))
+ (p.after (l.this "\p{ASCII}") (wrap (` (~! ascii^))))
+ (p.after (l.this "\p{Contrl}") (wrap (` (~! control^))))
+ (p.after (l.this "\p{Punct}") (wrap (` (~! punct^))))
+ (p.after (l.this "\p{Graph}") (wrap (` (~! graph^))))
+ (p.after (l.this "\p{Print}") (wrap (` (~! print^))))
)))
(def: re-class^
@@ -189,11 +189,11 @@
(def: re-back-reference^
(l.Lexer Code)
(p.either (do p.Monad<Parser>
- [_ (l.this "\\")
+ [_ (l.this "\")
id number^]
(wrap (` ((~! ..copy) (~ (code.identifier ["" (int/encode (.int id))]))))))
(do p.Monad<Parser>
- [_ (l.this "\\k<")
+ [_ (l.this "\k<")
captured-name name-part^
_ (l.this ">")]
(wrap (` ((~! ..copy) (~ (code.identifier ["" captured-name]))))))))
@@ -411,11 +411,11 @@
(regex ".")
"Escaping"
- (regex "\\.")
+ (regex "\.")
"Character classes"
- (regex "\\d")
- (regex "\\p{Lower}")
+ (regex "\d")
+ (regex "\p{Lower}")
(regex "[abc]")
(regex "[a-z]")
(regex "[a-zA-Z]")
@@ -449,11 +449,11 @@
"Groups"
(regex "a(.)c")
(regex "a(b+)c")
- (regex "(\\d{3})-(\\d{3})-(\\d{4})")
- (regex "(\\d{3})-(?:\\d{3})-(\\d{4})")
- (regex "(?<code>\\d{3})-\\k<code>-(\\d{4})")
- (regex "(?<code>\\d{3})-\\k<code>-(\\d{4})-\\0")
- (regex "(\\d{3})-((\\d{3})-(\\d{4}))")
+ (regex "(\d{3})-(\d{3})-(\d{4})")
+ (regex "(\d{3})-(?:\d{3})-(\d{4})")
+ (regex "(?<code>\d{3})-\k<code>-(\d{4})")
+ (regex "(?<code>\d{3})-\k<code>-(\d{4})-\0")
+ (regex "(\d{3})-((\d{3})-(\d{4}))")
"Alternation"
(regex "a|b")
@@ -477,11 +477,11 @@
{branches (p.many s.any)})
{#.doc (doc "Allows you to test text against regular expressions."
(case some-text
- (^regex "(\\d{3})-(\\d{3})-(\\d{4})"
+ (^regex "(\d{3})-(\d{3})-(\d{4})"
[_ country-code area-code place-code])
do-some-thing-when-number
- (^regex "\\w+")
+ (^regex "\w+")
do-some-thing-when-word
_