aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/format/json.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-06-12 00:38:20 -0400
committerEduardo Julian2022-06-12 00:38:20 -0400
commitb48ea68a83d01903554c7696c77eedaaf1035680 (patch)
treec342d8094c3158de16526f874ca9624418cd2dd2 /stdlib/source/library/lux/data/format/json.lux
parent7abf2d0ac55c229a8793bbff31f132596ffcb275 (diff)
De-sigil-ification: suffix : [Part 3]
Diffstat (limited to 'stdlib/source/library/lux/data/format/json.lux')
-rw-r--r--stdlib/source/library/lux/data/format/json.lux18
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux
index 6e358ec80..4f95615ed 100644
--- a/stdlib/source/library/lux/data/format/json.lux
+++ b/stdlib/source/library/lux/data/format/json.lux
@@ -31,7 +31,7 @@
["n" nat]
["f" frac (.open: "[1]#[0]" decimal)]]]]])
-(template [<name> <type>]
+(with_template [<name> <type>]
[(type: .public <name>
<type>)]
@@ -51,7 +51,7 @@
{#Array (Sequence JSON)}
{#Object (Dictionary String JSON)})))
-(template [<name> <type>]
+(with_template [<name> <type>]
[(type: .public <name>
<type>)]
@@ -101,7 +101,7 @@
{#Null' _}
(` {..#Null})
- (^.template [<ctor> <input_tag> <output_tag>]
+ (^.with_template [<ctor> <input_tag> <output_tag>]
[{<input_tag> value}
(` {<output_tag> (~ (<ctor> value))})])
([code.bit ..#Boolean' ..#Boolean]
@@ -158,7 +158,7 @@
_
{try.#Failure (all text#composite "Cannot set field '" key "' on a non-object.")}))
-(template [<name> <tag> <type>]
+(with_template [<name> <tag> <type>]
[(def: .public (<name> key json)
(-> Text JSON (Try <type>))
(case (field key json)
@@ -186,7 +186,7 @@
[{#Null} {#Null}]
#1
- (^.template [<tag> <struct>]
+ (^.with_template [<tag> <struct>]
[[{<tag> x'} {<tag> y'}]
(at <struct> = x' y')])
([#Boolean bit.equivalence]
@@ -252,7 +252,7 @@
(|>> (text.replaced text.double_quote ..escaped_dq)
(text.enclosed [text.double_quote text.double_quote])))
-(template [<token> <name>]
+(with_template [<token> <name>]
[(def: <name>
Text
<token>)]
@@ -292,7 +292,7 @@
(def: .public (format json)
(-> JSON Text)
(case json
- (^.template [<tag> <format>]
+ (^.with_template [<tag> <format>]
[{<tag> value}
(<format> value)])
([#Null ..null_format]
@@ -324,7 +324,7 @@
[_ (<text>.this "null")]
(in [])))
-(template [<name> <token> <value>]
+(with_template [<name> <token> <value>]
[(def: <name>
(Parser Boolean)
(do <>.monad
@@ -405,7 +405,7 @@
value json_parser]
(in [key value])))
-(template [<name> <type> <open> <close> <elem_parser> <prep>]
+(with_template [<name> <type> <open> <close> <elem_parser> <prep>]
[(def: (<name> json_parser)
(-> (Parser JSON) (Parser <type>))
(do <>.monad