mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-18 18:37:32 +02:00
Removing uneeded \scheme inside \macro in loop docs.
Fixing bug that choked on this (issue #260).
This commit is contained in:
parent
7f7a75d4f5
commit
8502d8e902
2 changed files with 13 additions and 9 deletions
|
@ -755,11 +755,15 @@ div#footer {padding-bottom: 50px}
|
||||||
cur))
|
cur))
|
||||||
(define (get-ids sxml)
|
(define (get-ids sxml)
|
||||||
(match sxml
|
(match sxml
|
||||||
(((or 'procedure 'macro) str)
|
(((or 'procedure 'macro) x)
|
||||||
(list
|
(cond
|
||||||
(string->symbol
|
((string? x)
|
||||||
(string-trim (car (string-split str))
|
(list
|
||||||
(lambda (ch) (or (eq? ch #\() (eq? ch #\))))))))
|
(string->symbol
|
||||||
|
(string-trim (car (string-split x))
|
||||||
|
(lambda (ch) (or (eq? ch #\() (eq? ch #\))))))))
|
||||||
|
(else
|
||||||
|
'())))
|
||||||
((x ...) (append-map get-ids x))
|
((x ...) (append-map get-ids x))
|
||||||
(else '())))
|
(else '())))
|
||||||
(skip-horizontal-whitespace in)
|
(skip-horizontal-whitespace in)
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
;;> \macro{\scheme{(loop [name] (vars ...) [=> result] body ...)}}
|
;;> \macro{(loop [name] (vars ...) [=> result] body ...)}
|
||||||
|
|
||||||
(define-syntax loop
|
(define-syntax loop
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
;; \item{\var{final-vars} - final variables, bound only in the => result}
|
;; \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.
|
;;> 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))))
|
(%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 vec))}
|
||||||
;;> \macro{(for var [index] (in-vector-reverse 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))}
|
;;> \macro{(for ch [cursor] (in-string str))}
|
||||||
|
|
||||||
(define-syntax in-string
|
(define-syntax in-string
|
||||||
|
|
Loading…
Add table
Reference in a new issue