aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/format/json.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/data/format/json.lux')
-rw-r--r--stdlib/source/lux/data/format/json.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index 280aab24b..e8189a594 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -217,19 +217,19 @@
(def: data-sep
(Lexer [Text Char Text])
- ($_ lexer;seq space~ (lexer;this-char #",") space~))
+ ($_ lexer;seq space~ (lexer;char #",") space~))
(def: null~
(Lexer Null)
(do Monad<Lexer>
- [_ (lexer;this "null")]
+ [_ (lexer;text "null")]
(wrap [])))
(do-template [<name> <token> <value>]
[(def: <name>
(Lexer Boolean)
(do Monad<Lexer>
- [_ (lexer;this <token>)]
+ [_ (lexer;text <token>)]
(wrap <value>)))]
[t~ "true" true]
@@ -244,12 +244,12 @@
(Lexer Number)
(do Monad<Lexer>
[?sign (: (Lexer (Maybe Text))
- (lexer;opt (lexer;this "-")))
+ (lexer;opt (lexer;text "-")))
digits (: (Lexer Text)
(lexer;many' lexer;digit))
?decimals (: (Lexer (Maybe Text))
(lexer;opt (do @
- [_ (lexer;this ".")]
+ [_ (lexer;text ".")]
(lexer;many' lexer;digit))))]
(case (: (Error Real)
(Real/decode (format (default "" ?sign)
@@ -290,9 +290,9 @@
(def: string~
(Lexer String)
(do Monad<Lexer>
- [_ (lexer;this "\"")
+ [_ (lexer;text "\"")
string-body string-body~
- _ (lexer;this "\"")]
+ _ (lexer;text "\"")]
(wrap string-body)))
(def: (kv~ json~)
@@ -300,7 +300,7 @@
(do Monad<Lexer>
[key string~
_ space~
- _ (lexer;this-char #":")
+ _ (lexer;char #":")
_ space~
value (json~ [])]
(wrap [key value])))
@@ -309,11 +309,11 @@
[(def: (<name> json~)
(-> (-> Unit (Lexer JSON)) (Lexer <type>))
(do Monad<Lexer>
- [_ (lexer;this-char <open>)
+ [_ (lexer;char <open>)
_ space~
elems (lexer;sep-by data-sep <elem-parser>)
_ space~
- _ (lexer;this-char <close>)]
+ _ (lexer;char <close>)]
(wrap (<prep> elems))))]
[array~ Array #"[" #"]" (json~ []) vector;from-list]