Compare commits

...

3 Commits

@ -20,7 +20,8 @@
;; if `define-meta` is defined it will pop an error msg if the wrong number of args
;; even though this error will happen after macro expansion, when metas are extracted
;; empty string will merge with surroundings
(define+provide (define-meta k v) "")
(provide define-meta)
(define-syntax-rule (define-meta k v) (begin))
(define+provide current-metas (make-parameter #f))

@ -1 +1 @@
1542295809
1542679573

@ -132,4 +132,6 @@
(define-settable poly-targets '(html)) ; current target applied to multi-output source files
(define+provide current-poly-target (make-parameter (car (poly-targets))))
(define-settable index-pages '("index.html"))
(define-settable index-pages '("index.html"))
(define-settable allow-unbound-ids #true)

@ -1,11 +1,16 @@
#lang racket/base
(require (for-syntax racket/base) pollen/tag)
(require (for-syntax racket/base pollen/setup) pollen/tag)
(provide def/c (rename-out (top~ #%top)))
(define-syntax-rule (top~ . ID)
(#%app make-default-tag-function 'ID))
(define-syntax (top~ stx)
(syntax-case stx ()
[(_ . ID)
(setup:allow-unbound-ids)
#'(#%app make-default-tag-function 'ID)]
[(_ . ID)
#'(def/c ID)]))
(define-syntax (def/c stx)
(syntax-case stx ()
[(_ X) (identifier-binding #'X) #'X]
[(_ X) #'(#%top . X)]))
[(_ ID) (identifier-binding #'ID) #'ID]
[(_ ID) #'(#%top . ID)]))
Loading…
Cancel
Save