add get-info

pull/2/head
Matthew Butterick 8 years ago
parent d6370a7f98
commit c8899a603b

@ -7,7 +7,7 @@
(define module-datum `(module bf-mod br/demo/jsonic/expander
,parse-tree))
(datum->syntax #f module-datum))
(provide read-syntax))
(provide read-syntax get-info))
(require parser-tools/lex parser-tools/lex-sre brag/support)
(define (tokenize port)
@ -24,6 +24,15 @@
(our-lexer port))
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 ip (open-input-string str))
(define token-producer (tokenize ip))

Loading…
Cancel
Save