tiny tweak

pull/102/head
Matthew Butterick 9 years ago
parent 4bf2c9b5f8
commit 993cad9367

@ -55,6 +55,7 @@
reader-mode)) reader-mode))
(define meta-keys-plus-here (cons (world:current-here-path-key) meta-keys)) ; here-path at front so it can be overridden (define meta-keys-plus-here (cons (world:current-here-path-key) meta-keys)) ; here-path at front so it can be overridden
(define meta-values-plus-here (cons reader-here-path meta-values)) (define meta-values-plus-here (cons reader-here-path meta-values))
(define post-parser-syntax
(with-syntax ([(KEY ...) (datum->syntax source-stx meta-keys-plus-here)] (with-syntax ([(KEY ...) (datum->syntax source-stx meta-keys-plus-here)]
[(VALUE ...) (datum->syntax source-stx meta-values-plus-here)] [(VALUE ...) (datum->syntax source-stx meta-values-plus-here)]
[METAS (format-id source-stx "~a" (world:current-meta-export))] [METAS (format-id source-stx "~a" (world:current-meta-export))]
@ -64,8 +65,8 @@
[PARSER-MODE-VALUE (format-symbol "~a" parser-mode)] [PARSER-MODE-VALUE (format-symbol "~a" parser-mode)]
[DIRECTORY-REQUIRES (datum->syntax source-stx (require+provide-directory-require-files path-string))] [DIRECTORY-REQUIRES (datum->syntax source-stx (require+provide-directory-require-files path-string))]
[(SOURCE-LINE ...) (datum->syntax source-stx meta-free-file-data)]) [(SOURCE-LINE ...) (datum->syntax source-stx meta-free-file-data)])
(syntax-property (replace-context
(replace-context source-stx source-stx
#'(module runtime-wrapper racket/base #'(module runtime-wrapper racket/base
(module META-MOD racket/base (module META-MOD racket/base
(provide (all-defined-out)) (provide (all-defined-out))
@ -82,9 +83,10 @@
(require (submod pollen/runtime-config show) 'POLLEN-MOD) (require (submod pollen/runtime-config show) 'POLLEN-MOD)
(provide (all-from-out 'POLLEN-MOD)) (provide (all-from-out 'POLLEN-MOD))
(show DOC inner:parser-mode))) (show DOC inner:parser-mode)))))
(syntax-property post-parser-syntax
'module-language 'module-language
'#(pollen/language-info get-language-info #f))))) '#(pollen/language-info get-language-info #f))))
(define-syntax-rule (define+provide-reader-in-mode mode) (define-syntax-rule (define+provide-reader-in-mode mode)

Loading…
Cancel
Save