\ Some tests for json importer \ Copyright (C) 2018 Bernd Paysan \ This program is free software: you can redistribute it and/or modify \ it under the terms of the GNU Affero General Public License as published by \ the Free Software Foundation, either version 3 of the License, or \ (at your option) any later version. \ This program is distributed in the hope that it will be useful, \ but WITHOUT ANY WARRANTY; without even the implied warranty of \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \ GNU Affero General Public License for more details. \ You should have received a copy of the GNU Affero General Public License \ along with this program. If not, see . require parser.fs cs-scope: test object class{ test field: strings[] field: numbers[]# field: floats[]% field: objects[] }class object class{ objects $value: name$ value: number# }class }scope : test-scan ( -- ) ['] test >body to schema-scope test:test-class to outer-class ['] test:test >body to schema-wid ; test-scan "test.json" json-load value test-result \\\ Local Variables: forth-local-words: ( (("class{") definition-starter (font-lock-keyword-face . 1) "[ \t\n]" t name (font-lock-function-name-face . 3)) (("}class") definition-ender (font-lock-keyword-face . 1)) ) forth-local-indent-words: ( (("class{") (0 . 2) (0 . 2)) (("}class") (-2 . 0) (0 . -2)) ) End: [THEN]