aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/parser
diff options
context:
space:
mode:
authorEduardo Julian2022-10-19 19:34:33 -0400
committerEduardo Julian2022-10-19 19:34:33 -0400
commit820ffc0a87d7960e62508fc451d9df7a94a6afa7 (patch)
tree33ff1ac227942820f92b43c0a8b872d4e080f974 /stdlib/source/parser
parentd9a1d70ec04fd5796276aeb46038654ade4484f9 (diff)
Migrating default extensions to the new format [Part 2]
Diffstat (limited to 'stdlib/source/parser')
-rw-r--r--stdlib/source/parser/lux/data/binary.lux6
-rw-r--r--stdlib/source/parser/lux/data/text.lux18
2 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/parser/lux/data/binary.lux b/stdlib/source/parser/lux/data/binary.lux
index 2a1bf3304..3130b607a 100644
--- a/stdlib/source/parser/lux/data/binary.lux
+++ b/stdlib/source/parser/lux/data/binary.lux
@@ -49,9 +49,9 @@
(template (<name> <parameter> <subject>)
[(<extension> <parameter> <subject>)]))]
- [n#= "lux i64 ="]
- [n#+ "lux i64 +"]
- [n#- "lux i64 -"]
+ [n#= .i64_=#]
+ [n#+ .i64_+#]
+ [n#- .i64_-#]
)
(def .public (result parser input)
diff --git a/stdlib/source/parser/lux/data/text.lux b/stdlib/source/parser/lux/data/text.lux
index 50bb41cb3..dc2507cff 100644
--- a/stdlib/source/parser/lux/data/text.lux
+++ b/stdlib/source/parser/lux/data/text.lux
@@ -92,7 +92,7 @@
slices parser]
(in (list#mix (function (_ [slice::basis slice::distance]
[total::basis total::distance])
- [total::basis ("lux i64 +" slice::distance total::distance)])
+ [total::basis (.i64_+# slice::distance total::distance)])
[#basis offset
#distance 0]
slices))))
@@ -102,7 +102,7 @@
(function (_ [offset tape])
(when (/.char offset tape)
{.#Some output}
- {try.#Success [[("lux i64 +" 1 offset) tape] (/.of_char output)]}
+ {try.#Success [[(.i64_+# 1 offset) tape] (/.of_char output)]}
_
(exception.except ..cannot_parse []))))
@@ -112,7 +112,7 @@
(function (_ [offset tape])
(when (/.char offset tape)
{.#Some _}
- {try.#Success [[("lux i64 +" 1 offset) tape]
+ {try.#Success [[(.i64_+# 1 offset) tape]
[#basis offset
#distance 1]]}
@@ -145,7 +145,7 @@
(when (/.index_since offset reference tape)
{.#Some where}
(if (n.= offset where)
- {try.#Success [[("lux i64 +" (/.size reference) offset) tape]
+ {try.#Success [[(.i64_+# (/.size reference) offset) tape]
[]]}
(exception.except ..cannot_match [reference]))
@@ -249,7 +249,7 @@
{.#Some output}
(let [output' (/.of_char output)]
(if (<modifier> (/.contains? output' options))
- {try.#Success [[("lux i64 +" 1 offset) tape] output']}
+ {try.#Success [[(.i64_+# 1 offset) tape] output']}
(exception.except <exception> [options output])))
_
@@ -267,7 +267,7 @@
{.#Some output}
(let [output' (/.of_char output)]
(if (<modifier> (/.contains? output' options))
- {try.#Success [[("lux i64 +" 1 offset) tape]
+ {try.#Success [[(.i64_+# 1 offset) tape]
[#basis offset
#distance 1]]}
(exception.except <exception> [options output])))
@@ -290,7 +290,7 @@
(when (/.char offset tape)
{.#Some output}
(if (parser output)
- {try.#Success [[("lux i64 +" 1 offset) tape] (/.of_char output)]}
+ {try.#Success [[(.i64_+# 1 offset) tape] (/.of_char output)]}
(exception.except ..character_does_not_satisfy_predicate [output]))
_
@@ -302,7 +302,7 @@
(when (/.char offset tape)
{.#Some output}
(if (parser output)
- {try.#Success [[("lux i64 +" 1 offset) tape]
+ {try.#Success [[(.i64_+# 1 offset) tape]
[#basis offset #distance 1]]}
(exception.except ..character_does_not_satisfy_predicate [output]))
@@ -329,7 +329,7 @@
(do //.monad
[(open "left[0]") left
(open "right[0]") right]
- (in [left#basis ("lux i64 +" left#distance right#distance)])))
+ (in [left#basis (.i64_+# left#distance right#distance)])))
(with_template [<name> <base> <doc_modifier>]
[(def .public (<name> parser)