projects
/
watForth.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
json testing
[watForth.git]
/
forth.forth
diff --git
a/forth.forth
b/forth.forth
index
47224b9
..
8f609d7
100644
(file)
--- a/
forth.forth
+++ b/
forth.forth
@@
-160,15
+160,18
@@
here define-does then compiling ;
:> CHAR: lit lit , ' char: execute , ;
\ JSON Compiler
:> 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-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 ;
\ Include a remote file
: REQUIRE" ' quit channel-open dup \' " \, fetch channel-await ;