|
|
@ -2,8 +2,8 @@
|
|
|
|
(require json (for-syntax br/datum racket/string))
|
|
|
|
(require json (for-syntax br/datum racket/string))
|
|
|
|
(provide (rename-out [jsonic-mb #%module-begin])
|
|
|
|
(provide (rename-out [jsonic-mb #%module-begin])
|
|
|
|
jsonic-program
|
|
|
|
jsonic-program
|
|
|
|
char
|
|
|
|
other-char
|
|
|
|
s-val)
|
|
|
|
s-exp)
|
|
|
|
|
|
|
|
|
|
|
|
(define-macro (jsonic-mb PARSE-TREE)
|
|
|
|
(define-macro (jsonic-mb PARSE-TREE)
|
|
|
|
#'(#%module-begin
|
|
|
|
#'(#%module-begin
|
|
|
@ -14,7 +14,7 @@
|
|
|
|
(define-macro (jsonic-program STR ...)
|
|
|
|
(define-macro (jsonic-program STR ...)
|
|
|
|
#'(string-append STR ...))
|
|
|
|
#'(string-append STR ...))
|
|
|
|
|
|
|
|
|
|
|
|
(define-macro (char STR)
|
|
|
|
(define-macro (other-char STR)
|
|
|
|
#'STR)
|
|
|
|
#'STR)
|
|
|
|
|
|
|
|
|
|
|
|
(define (stringify result)
|
|
|
|
(define (stringify result)
|
|
|
@ -26,7 +26,7 @@
|
|
|
|
(format "~a: ~a" (stringify k) (stringify v))) ", "))]
|
|
|
|
(format "~a: ~a" (stringify k) (stringify v))) ", "))]
|
|
|
|
[else ""]))
|
|
|
|
[else ""]))
|
|
|
|
|
|
|
|
|
|
|
|
(define-macro (s-val STR ...)
|
|
|
|
(define-macro (s-exp STR ...)
|
|
|
|
(define s-exp-string
|
|
|
|
(define s-exp-string
|
|
|
|
(string-join (map syntax->datum (syntax->list #'(STR ...))) ""))
|
|
|
|
(string-join (map syntax->datum (syntax->list #'(STR ...))) ""))
|
|
|
|
(with-pattern ([DATUM (format-datum '~a s-exp-string)])
|
|
|
|
(with-pattern ([DATUM (format-datum '~a s-exp-string)])
|
|
|
|