Debugging utility.

This commit is contained in:
Tony Garnock-Jones 2014-12-27 17:15:28 -05:00
parent 02b037b42e
commit 731d99a7b0
1 changed files with 11 additions and 0 deletions

View File

@ -213,6 +213,17 @@
[(< pos hi) (values 'here #t)]
[else (values 'right (- pos hi))]))))
;; (define (dump-mark-tree r)
;; (define (-> r)
;; (if r
;; (list (set->list (rope-marks* r))
;; (hash->list (rope-mark-index r))
;; (-> (rope-left r))
;; (-> (rope-right r)))
;; '()))
;; (local-require racket/pretty)
;; (pretty-print (-> r) (current-error-port)))
;; Searches from pos (inclusive) in the direction indicated.
;; Pos points to a mark-position, not a character-position.
(define (find-mark* r forward? mtype start-pos)