doc work: reference on syntax objects
svn: r6882 original commit: 8470b614669a3c57f11f329e07c86459ab588e45
This commit is contained in:
parent
6bf60b5dcc
commit
81c244f607
|
@ -192,6 +192,7 @@
|
||||||
|
|
||||||
(provide defproc defproc* defstruct defthing defparam defboolparam
|
(provide defproc defproc* defstruct defthing defparam defboolparam
|
||||||
defform defform* defform/subs defform*/subs defform/none
|
defform defform* defform/subs defform*/subs defform/none
|
||||||
|
defidform
|
||||||
specform specform/subs
|
specform specform/subs
|
||||||
specsubform specsubform/subs specspecsubform specspecsubform/subs specsubform/inline
|
specsubform specsubform/subs specspecsubform specspecsubform/subs specsubform/inline
|
||||||
schemegrammar schemegrammar*
|
schemegrammar schemegrammar*
|
||||||
|
@ -311,6 +312,15 @@
|
||||||
'(spec) (list (lambda (ignored) (schemeblock0 spec)))
|
'(spec) (list (lambda (ignored) (schemeblock0 spec)))
|
||||||
null null
|
null null
|
||||||
(lambda () (list desc ...)))]))
|
(lambda () (list desc ...)))]))
|
||||||
|
(define-syntax (defidform stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
[(_ spec-id desc ...)
|
||||||
|
#'(*defforms (quote-syntax spec-id) null
|
||||||
|
'(spec-id)
|
||||||
|
(list (lambda (x) (make-paragraph (list x))))
|
||||||
|
null
|
||||||
|
null
|
||||||
|
(lambda () (list desc ...)))]))
|
||||||
(define-syntax specsubform
|
(define-syntax specsubform
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ #:literals (lit ...) spec desc ...)
|
[(_ #:literals (lit ...) spec desc ...)
|
||||||
|
@ -837,7 +847,11 @@
|
||||||
(apply
|
(apply
|
||||||
append
|
append
|
||||||
(map (lambda (form)
|
(map (lambda (form)
|
||||||
(let loop ([form (cons (if kw-id (cdr form) form)
|
(let loop ([form (cons (if kw-id
|
||||||
|
(if (pair? form)
|
||||||
|
(cdr form)
|
||||||
|
null)
|
||||||
|
form)
|
||||||
subs)])
|
subs)])
|
||||||
(cond
|
(cond
|
||||||
[(symbol? form) (if (or (meta-symbol? form)
|
[(symbol? form) (if (or (meta-symbol? form)
|
||||||
|
@ -869,7 +883,10 @@
|
||||||
(eq? form (car forms))
|
(eq? form (car forms))
|
||||||
(make-target-element
|
(make-target-element
|
||||||
#f
|
#f
|
||||||
(list (to-element (make-just-context (car form) kw-id)))
|
(list (to-element (make-just-context (if (pair? form)
|
||||||
|
(car form)
|
||||||
|
form)
|
||||||
|
kw-id)))
|
||||||
(register-scheme-form-definition kw-id))))))))
|
(register-scheme-form-definition kw-id))))))))
|
||||||
forms form-procs)
|
forms form-procs)
|
||||||
(if (null? sub-procs)
|
(if (null? sub-procs)
|
||||||
|
|
|
@ -363,6 +363,7 @@
|
||||||
(let ([c (syntax-e c)])
|
(let ([c (syntax-e c)])
|
||||||
(let ([s (format "~s" c)])
|
(let ([s (format "~s" c)])
|
||||||
(if (and (symbol? c)
|
(if (and (symbol? c)
|
||||||
|
((string-length s) . > . 1)
|
||||||
(char=? (string-ref s 0) #\_))
|
(char=? (string-ref s 0) #\_))
|
||||||
(values (substring s 1) #t #f)
|
(values (substring s 1) #t #f)
|
||||||
(values s #f #f))))]
|
(values s #f #f))))]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user