diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/text/regex.lux | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/lux/data/text/regex.lux b/stdlib/source/lux/data/text/regex.lux index 51a2b097e..2897a09fa 100644 --- a/stdlib/source/lux/data/text/regex.lux +++ b/stdlib/source/lux/data/text/regex.lux @@ -2,15 +2,15 @@ [lux #* [control monad - ["p" parser ("#/." monad)]] + ["p" parser ("#;." monad)]] [data ["." product] ["." error] ["." maybe] ["." number (#+ hex) - ["." int ("#/." codec)]] + ["." int ("#;." codec)]] [collection - ["." list ("#/." fold monad)]]] + ["." list ("#;." fold monad)]]] ["." macro (#+ with-gensyms) ["." code] ["s" syntax (#+ syntax:)]]] @@ -45,7 +45,7 @@ (def: (copy reference) (-> Text (l.Lexer Text)) - (p.after (l.this reference) (p/wrap reference))) + (p.after (l.this reference) (p;wrap reference))) (def: (join-text^ part^) (-> (l.Lexer (List Text)) (l.Lexer Text)) @@ -68,10 +68,10 @@ (def: (name^ current-module) (-> Text (l.Lexer Name)) ($_ p.either - (p.and (p/wrap current-module) (p.after (l.this "..") name-part^)) + (p.and (p;wrap current-module) (p.after (l.this "..") name-part^)) (p.and name-part^ (p.after (l.this ".") name-part^)) - (p.and (p/wrap "lux") (p.after (l.this ".") name-part^)) - (p.and (p/wrap "") name-part^))) + (p.and (p;wrap "lux") (p.after (l.this ".") name-part^)) + (p.and (p;wrap "") name-part^))) (def: (re-var^ current-module) (-> Text (l.Lexer Code)) @@ -116,7 +116,7 @@ [_ (wrap []) init re-user-class^' rest (p.some (p.after (l.this "&&") (l.enclosed ["[" "]"] re-user-class^')))] - (wrap (list/fold (function (_ refinement base) + (wrap (list;fold (function (_ refinement base) (` ((~! refine^) (~ refinement) (~ base)))) init rest)))) @@ -192,7 +192,7 @@ (p.either (do p.monad [_ (l.this "\") id number^] - (wrap (` ((~! ..copy) (~ (code.identifier ["" (int/encode (.int id))])))))) + (wrap (` ((~! ..copy) (~ (code.identifier ["" (int;encode (.int id))])))))) (do p.monad [_ (l.this "\k<") captured-name name-part^ @@ -271,7 +271,7 @@ (re-scoped^ current-module))) #let [g!total (code.identifier ["" "0total"]) g!temp (code.identifier ["" "0temp"]) - [_ names steps] (list/fold (: (-> (Either Code [Re-Group Code]) + [_ names steps] (list;fold (: (-> (Either Code [Re-Group Code]) [Int (List Code) (List (List Code))] [Int (List Code) (List (List Code))]) (function (_ part [idx names steps]) @@ -289,7 +289,7 @@ [idx (code.identifier ["" _name])] #.None - [(inc idx) (code.identifier ["" (int/encode idx)])]) + [(inc idx) (code.identifier ["" (int;encode idx)])]) access (if (n/> 0 num-captures) (` ((~! product.left) (~ name!))) name!)] @@ -308,7 +308,7 @@ 0) (` (do p.monad [(~ (' #let)) [(~ g!total) ""] - (~+ (|> steps list.reverse list/join))] + (~+ (|> steps list.reverse list;join))] ((~ (' wrap)) [(~ g!total) (~+ (list.reverse names))])))]) )) @@ -364,13 +364,13 @@ #let [g!op (code.identifier ["" " alt "])]] (if (list.empty? tail) (wrap head) - (wrap [(list/fold n/max (product.left head) (list/map product.left tail)) + (wrap [(list;fold n/max (product.left head) (list;map product.left tail)) (` (let [(~ g!op) (~ (if capturing? (` (~! |||^)) (` (~! |||_^))))] ($_ (~ g!op) (~ (prep-alternative head)) - (~+ (list/map prep-alternative tail)))))])))) + (~+ (list;map prep-alternative tail)))))])))) (def: (re-scoped^ current-module) (-> Text (l.Lexer [Re-Group Code])) |