Removing uneeded \scheme inside \macro in loop docs.

Fixing bug that choked on this (issue #260).
This commit is contained in:
Alex Shinn 2015-04-28 08:30:12 +09:00
parent 7f7a75d4f5
commit 8502d8e902
2 changed files with 13 additions and 9 deletions

View file

@ -755,11 +755,15 @@ div#footer {padding-bottom: 50px}
cur))
(define (get-ids sxml)
(match sxml
(((or 'procedure 'macro) str)
(list
(string->symbol
(string-trim (car (string-split str))
(lambda (ch) (or (eq? ch #\() (eq? ch #\))))))))
(((or 'procedure 'macro) x)
(cond
((string? x)
(list
(string->symbol
(string-trim (car (string-split x))
(lambda (ch) (or (eq? ch #\() (eq? ch #\))))))))
(else
'())))
((x ...) (append-map get-ids x))
(else '())))
(skip-horizontal-whitespace in)

View file

@ -49,7 +49,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;> \macro{\scheme{(loop [name] (vars ...) [=> result] body ...)}}
;;> \macro{(loop [name] (vars ...) [=> result] body ...)}
(define-syntax loop
(syntax-rules ()
@ -154,7 +154,7 @@
;; \item{\var{final-vars} - final variables, bound only in the => result}
;; ]
;;> \subsubsubsection{\scheme{(for var [pair] (in-list ls [cdr]))}}
;;> \macro{(for var [pair] (in-list ls [cdr]))}
;;> Basic list iterator.
@ -225,11 +225,11 @@
(%in-idx < (lambda (x i) (- i 1)) (lambda (x) (- (length x) 1)) (lambda (x) 0) ref tmp seq next . rest))))
))))
(define-in-indexed in-vector in-vector-reverse vector-length vector-ref)
;;> \macro{(for var [index] (in-vector vec))}
;;> \macro{(for var [index] (in-vector-reverse vec))}
(define-in-indexed in-vector in-vector-reverse vector-length vector-ref)
;;> \macro{(for ch [cursor] (in-string str))}
(define-syntax in-string