Skip to content

Commit 15ea025

Browse files
committed
Support let/ec and let/cc
1 parent 5d76153 commit 15ea025

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

conventions.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@
515515
[("test-begin") (format-uniform-body/helper 0 #:require-body? #f)]
516516
[("begin0") (format-uniform-body/helper 1)]
517517
[("module+") (format-uniform-body/helper 1)]
518+
[("let/ec" "let/cc") (format-uniform-body/helper 1)]
518519
[("test-case" "test-suite") (format-uniform-body/helper 1)]
519520
[("define-syntax-class" "define-match-expander") (format-uniform-body/helper 1)]
520521
[("class" "interface") (format-uniform-body/helper 1 #:require-body? #f)]

tests/test-cases/large2.rkt.out

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2739,20 +2739,20 @@
27392739
[do-save?
27402740
(define continue?
27412741
(let/ec k
2742-
(for ([tab (in-list save-candidates)])
2743-
(unless (send (send tab get-defs) save-file/gui-error)
2744-
(k #f)))
2745-
#t))
2742+
(for ([tab (in-list save-candidates)])
2743+
(unless (send (send tab get-defs) save-file/gui-error)
2744+
(k #f)))
2745+
#t))
27462746
(update-tabs-labels)
27472747
continue?]
27482748
[else #t])])]))
27492749

27502750
(define/private (save-all-unsaved-files)
27512751
(let/ec k
2752-
(for ([tab (in-list (get-unsaved-candidate-tabs #f))])
2753-
(parameterize ([editor:silent-cancel-on-save-file-out-of-date? #t])
2754-
(unless (send (send tab get-defs) save-file #f 'same #f)
2755-
(k (void))))))
2752+
(for ([tab (in-list (get-unsaved-candidate-tabs #f))])
2753+
(parameterize ([editor:silent-cancel-on-save-file-out-of-date? #t])
2754+
(unless (send (send tab get-defs) save-file #f 'same #f)
2755+
(k (void))))))
27562756
(update-tabs-labels))
27572757

27582758
(define/private (get-unsaved-candidate-tabs skip-me?)
@@ -5314,8 +5314,8 @@
53145314
(check-equal? (string-length (compute-label-string (string->path (make-string 200 #\x)))) 200)
53155315
(for ([i (in-range 100 300)])
53165316
(let/ec k
5317-
(parameterize ([error-escape-handler k])
5318-
(check-true (string? (compute-label-string (string->path (make-string i #\x))))))))
5317+
(parameterize ([error-escape-handler k])
5318+
(check-true (string? (compute-label-string (string->path (make-string i #\x))))))))
53195319

53205320
(check-true (is-lang-line? "#lang x"))
53215321
(check-true (is-lang-line? "#lang racket"))

tests/test-cases/let-cc-ec.rkt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#lang racket
2+
3+
(let/ec
4+
k
5+
(define x 1)
6+
x)

tests/test-cases/let-cc-ec.rkt.out

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#lang racket
2+
3+
(let/ec k
4+
(define x 1)
5+
x)

0 commit comments

Comments
 (0)