Skip to content

Commit 0c1aef5

Browse files
committed
use debug-readtable in runtime-config
closes #6
1 parent 1484315 commit 0c1aef5

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

debug/lang/runtime-config.rkt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
(provide configure)
44

5-
;; TODO: have the `configure` function call a
6-
;; `use-debug-readtable` function
5+
(require (only-in debug/reader use-debug-readtable))
76

87
(define (configure data)
9-
(void))
8+
(use-debug-readtable))

debug/reader.rkt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#lang racket/base
22

33
(provide make-debug-readtable
4+
use-debug-readtable
45
current-syntax-introducer
56
wrap-reader)
67

@@ -28,6 +29,11 @@
2829
(make-readtable rt report-char 'dispatch-macro report-proc))
2930

3031

32+
(define (use-debug-readtable [orig-rt (current-readtable)])
33+
(port-count-lines! (current-input-port))
34+
(current-readtable (make-debug-readtable orig-rt)))
35+
36+
3137
;; current-syntax-introducer : (Parameterof [Syntax -> Syntax])
3238
(define current-syntax-introducer
3339
(make-parameter (λ (x) x)))

0 commit comments

Comments
 (0)