X-Git-Url: https://git.kengrimes.com/?p=watForth.git;a=blobdiff_plain;f=forth.forth;h=8f609d70f17036fc4b8d8f4a04fffc3ad47883c7;hp=47224b9fd5be28b7a1e02989d034630e9d638f65;hb=2a1f14a4ef5efe8084d6cd0468af00c8828b2bb5;hpb=18b72639839461c074eb18fc2b58aa2a326485a1 diff --git a/forth.forth b/forth.forth index 47224b9..8f609d7 100644 --- a/forth.forth +++ b/forth.forth @@ -160,15 +160,18 @@ here define-does then compiling ; :> CHAR: lit lit , ' char: execute , ; \ JSON Compiler -: JSON-CTRL-CHAR char: { =? if ;; then - char: } =? if ;; then - char: [ =? if ;; then ; +: JSON-CTRL-CHAR? char: { =? if 1 ;; then + char: } =? if 1 ;; then + char: [ =? if 1 ;; then + char: ] =? if 1 ;; then + 0 ; : JSON-PARSE-V ; : JSON-PARSE-" ; : JSON-PARSE-[ ; : JSON-PARSE-{ ; -:> JSON-WORD wordstart key -1 =? if ;; then ws? ; +: JSON-WORD word-start key JSON-CTRL-CHAR? if word-end ;; then ws? ; +: JSON{ key ; \ Include a remote file : REQUIRE" ' quit channel-open dup \' " \, fetch channel-await ;