tiny tweak

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

@ -55,36 +55,38 @@
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))
(with-syntax ([(KEY ...) (datum->syntax source-stx meta-keys-plus-here)] (define post-parser-syntax
[(VALUE ...) (datum->syntax source-stx meta-values-plus-here)] (with-syntax ([(KEY ...) (datum->syntax source-stx meta-keys-plus-here)]
[METAS (format-id source-stx "~a" (world:current-meta-export))] [(VALUE ...) (datum->syntax source-stx meta-values-plus-here)]
[META-MOD (format-symbol "~a" (world:current-meta-export))] [METAS (format-id source-stx "~a" (world:current-meta-export))]
[POLLEN-MOD (format-symbol "~a" 'pollen-lang-module)] [META-MOD (format-symbol "~a" (world:current-meta-export))]
[DOC (format-id source-stx "~a" (world:current-main-export))] [POLLEN-MOD (format-symbol "~a" 'pollen-lang-module)]
[PARSER-MODE-VALUE (format-symbol "~a" parser-mode)] [DOC (format-id source-stx "~a" (world:current-main-export))]
[DIRECTORY-REQUIRES (datum->syntax source-stx (require+provide-directory-require-files path-string))] [PARSER-MODE-VALUE (format-symbol "~a" parser-mode)]
[(SOURCE-LINE ...) (datum->syntax source-stx meta-free-file-data)]) [DIRECTORY-REQUIRES (datum->syntax source-stx (require+provide-directory-require-files path-string))]
(syntax-property [(SOURCE-LINE ...) (datum->syntax source-stx meta-free-file-data)])
(replace-context source-stx (replace-context
#'(module runtime-wrapper racket/base source-stx
(module META-MOD racket/base #'(module runtime-wrapper racket/base
(provide (all-defined-out)) (module META-MOD racket/base
(define METAS (apply hash (append (list 'KEY VALUE) ...)))) (provide (all-defined-out))
(define METAS (apply hash (append (list 'KEY VALUE) ...))))
(module POLLEN-MOD pollen
(define parser-mode 'PARSER-MODE-VALUE) (module POLLEN-MOD pollen
(provide (except-out (all-defined-out) parser-mode) (define parser-mode 'PARSER-MODE-VALUE)
(prefix-out inner: parser-mode)) ; avoids conflicts with importing modules (provide (except-out (all-defined-out) parser-mode)
DIRECTORY-REQUIRES (prefix-out inner: parser-mode)) ; avoids conflicts with importing modules
(require (submod ".." ".." META-MOD)) ; get metas from adjacent submodule DIRECTORY-REQUIRES
(provide (all-from-out (submod ".." ".." META-MOD))) (require (submod ".." ".." META-MOD)) ; get metas from adjacent submodule
SOURCE-LINE ...) (provide (all-from-out (submod ".." ".." META-MOD)))
SOURCE-LINE ...)
(require (submod pollen/runtime-config show) 'POLLEN-MOD)
(provide (all-from-out 'POLLEN-MOD)) (require (submod pollen/runtime-config show) 'POLLEN-MOD)
(show DOC inner:parser-mode))) (provide (all-from-out 'POLLEN-MOD))
'module-language (show DOC inner:parser-mode)))))
'#(pollen/language-info get-language-info #f))))) (syntax-property post-parser-syntax
'module-language
'#(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