diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/text/regex.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/lux/data/text/regex.lux b/stdlib/source/lux/data/text/regex.lux index 158eea153..b009d9dea 100644 --- a/stdlib/source/lux/data/text/regex.lux +++ b/stdlib/source/lux/data/text/regex.lux @@ -76,7 +76,7 @@ (-> Text (l.Lexer Code)) (do p.Monad<Parser> [name (l.enclosed ["\\@<" ">"] (name^ current-module))] - (wrap (` (: (l.Lexer Text) (~ (code.symbol name))))))) + (wrap (` (: (l.Lexer Text) (~ (code.identifier name))))))) (def: re-range^ (l.Lexer Code) @@ -191,12 +191,12 @@ (p.either (do p.Monad<Parser> [_ (l.this "\\") id number^] - (wrap (` ((~! ..copy) (~ (code.symbol ["" (int/encode (.int id))])))))) + (wrap (` ((~! ..copy) (~ (code.identifier ["" (int/encode (.int id))])))))) (do p.Monad<Parser> [_ (l.this "\\k<") captured-name name-part^ _ (l.this ">")] - (wrap (` ((~! ..copy) (~ (code.symbol ["" captured-name])))))))) + (wrap (` ((~! ..copy) (~ (code.identifier ["" captured-name])))))))) (def: (re-simple^ current-module) (-> Text (l.Lexer Code)) @@ -268,8 +268,8 @@ (do p.Monad<Parser> [parts (p.many (p.alt (re-complex^ current-module) (re-scoped^ current-module))) - #let [g!total (code.symbol ["" "0total"]) - g!temp (code.symbol ["" "0temp"]) + #let [g!total (code.identifier ["" "0total"]) + g!temp (code.identifier ["" "0temp"]) [_ names steps] (list/fold (: (-> (Either Code [Re-Group Code]) [Int (List Code) (List (List Code))] [Int (List Code) (List (List Code))]) @@ -285,10 +285,10 @@ (#.Right [(#Capturing [?name num-captures]) scoped]) (let [[idx! name!] (case ?name (#.Some _name) - [idx (code.symbol ["" _name])] + [idx (code.identifier ["" _name])] #.None - [(inc idx) (code.symbol ["" (int/encode idx)])]) + [(inc idx) (code.identifier ["" (int/encode idx)])]) access (if (n/> +0 num-captures) (` ((~! product.left) (~ name!))) name!)] @@ -360,7 +360,7 @@ [#let [sub^ (re-sequential^ capturing? re-scoped^ current-module)] head sub^ tail (p.some (p.after (l.this "|") sub^)) - #let [g!op (code.symbol ["" " alt "])]] + #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)) |