You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#lang br/quicklang
|
|
|
|
(require json)
|
|
|
|
|
|
|
|
(define-macro (js-module-begin PARSE-TREE)
|
|
|
|
#'(#%module-begin
|
|
|
|
(define result-string PARSE-TREE)
|
|
|
|
(define validated-jsexpr (string->jsexpr result-string))
|
|
|
|
(display result-string)))
|
|
|
|
(provide (rename-out [js-module-begin #%module-begin]))
|
|
|
|
|
|
|
|
(define-macro (jsonic-char CHAR-TOK-VALUE)
|
|
|
|
#'CHAR-TOK-VALUE)
|
|
|
|
(provide jsonic-char)
|
|
|
|
|
|
|
|
(define-macro (jsonic-program SEXP-OR-JSON-STR ...)
|
|
|
|
#'(string-trim (string-append SEXP-OR-JSON-STR ...)))
|
|
|
|
(provide jsonic-program)
|
|
|
|
|
|
|
|
(define-macro (jsonic-sexp SEXP-STR)
|
|
|
|
(with-pattern ([SEXP-DATUM (format-datum '~a #'SEXP-STR)])
|
|
|
|
#'(jsexpr->string SEXP-DATUM)))
|
|
|
|
(provide jsonic-sexp)
|