|
|
@ -7,7 +7,7 @@
|
|
|
|
(define module-datum `(module bf-mod br/demo/jsonic/expander
|
|
|
|
(define module-datum `(module bf-mod br/demo/jsonic/expander
|
|
|
|
,parse-tree))
|
|
|
|
,parse-tree))
|
|
|
|
(datum->syntax #f module-datum))
|
|
|
|
(datum->syntax #f module-datum))
|
|
|
|
(provide read-syntax))
|
|
|
|
(provide read-syntax get-info))
|
|
|
|
|
|
|
|
|
|
|
|
(require parser-tools/lex parser-tools/lex-sre brag/support)
|
|
|
|
(require parser-tools/lex parser-tools/lex-sre brag/support)
|
|
|
|
(define (tokenize port)
|
|
|
|
(define (tokenize port)
|
|
|
@ -24,6 +24,15 @@
|
|
|
|
(our-lexer port))
|
|
|
|
(our-lexer port))
|
|
|
|
next-token)
|
|
|
|
next-token)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define (get-info . _)
|
|
|
|
|
|
|
|
(λ (key default)
|
|
|
|
|
|
|
|
(case key
|
|
|
|
|
|
|
|
[(color-lexer)
|
|
|
|
|
|
|
|
(dynamic-require 'syntax-color/default-lexer 'default-lexer (λ () #f))]
|
|
|
|
|
|
|
|
[(drracket:indentation)
|
|
|
|
|
|
|
|
(dynamic-require 'scribble/private/indentation 'determine-spaces)]
|
|
|
|
|
|
|
|
[else default])))
|
|
|
|
|
|
|
|
|
|
|
|
(define (test-tokenize str)
|
|
|
|
(define (test-tokenize str)
|
|
|
|
(define ip (open-input-string str))
|
|
|
|
(define ip (open-input-string str))
|
|
|
|
(define token-producer (tokenize ip))
|
|
|
|
(define token-producer (tokenize ip))
|
|
|
|