From 0ed7cb3a7d07cf92be57a8f26355212bcee0325d Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 19 Apr 2019 01:27:10 -0400 Subject: Renamed both "Poly" and "Lexer" to "Parser" in order to normalize naming a bit. --- stdlib/source/lux/data/format/json.lux | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'stdlib/source/lux/data/format/json.lux') diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux index beb5eca8d..162cf8387 100644 --- a/stdlib/source/lux/data/format/json.lux +++ b/stdlib/source/lux/data/format/json.lux @@ -7,8 +7,8 @@ codec] [control pipe - ["p" parser (#+ Parser) ("#@." monad) - ["l" text]] + ["p" parser ("#@." monad) + ["l" text (#+ Parser)]] ["ex" exception (#+ exception:)]] [data ["." bit] @@ -53,7 +53,7 @@ (type: #export (Reader a) {#.doc "JSON reader."} - (Parser (List JSON) a)) + (p.Parser (List JSON) a)) (syntax: #export (json token) {#.doc (doc "A simple way to produce JSON literals." @@ -436,22 +436,22 @@ ############################################################ (def: space~ - (l.Lexer Text) + (Parser Text) (l.some l.space)) (def: data-sep - (l.Lexer [Text Any Text]) + (Parser [Text Any Text]) ($_ p.and space~ (l.this ",") space~)) (def: null~ - (l.Lexer Null) + (Parser Null) (do p.monad [_ (l.this "null")] (wrap []))) (template [ ] [(def: - (l.Lexer Boolean) + (Parser Boolean) (do p.monad [_ (l.this )] (wrap )))] @@ -461,11 +461,11 @@ ) (def: boolean~ - (l.Lexer Boolean) + (Parser Boolean) (p.either true~ false~)) (def: number~ - (l.Lexer Number) + (Parser Number) (do p.monad [signed? (l.this? "-") digits (l.many l.decimal) @@ -487,7 +487,7 @@ (wrap value)))) (def: escaped~ - (l.Lexer Text) + (Parser Text) ($_ p.either (p.after (l.this "\t") (p@wrap text.tab)) @@ -505,7 +505,7 @@ (p@wrap "\")))) (def: string~ - (l.Lexer String) + (Parser String) (<| (l.enclosed [text.double-quote text.double-quote]) (loop [_ []]) (do p.monad @@ -519,7 +519,7 @@ (wrap chars)))) (def: (kv~ json~) - (-> (-> Any (l.Lexer JSON)) (l.Lexer [String JSON])) + (-> (-> Any (Parser JSON)) (Parser [String JSON])) (do p.monad [key string~ _ space~ @@ -530,7 +530,7 @@ (template [ ] [(def: ( json~) - (-> (-> Any (l.Lexer JSON)) (l.Lexer )) + (-> (-> Any (Parser JSON)) (Parser )) (do p.monad [_ (l.this ) _ space~ @@ -544,7 +544,7 @@ ) (def: (json~' _) - (-> Any (l.Lexer JSON)) + (-> Any (Parser JSON)) ($_ p.or null~ boolean~ number~ string~ (array~ json~') (object~ json~'))) (structure: #export codec (Codec Text JSON) -- cgit v1.2.3