syntax/parse: change test to use eval so no error logged when compiled
This commit is contained in:
parent
521ff7cc67
commit
19707a54be
|
@ -1,4 +1,3 @@
|
||||||
#lang info
|
#lang info
|
||||||
|
|
||||||
(define test-responsibles '((all ryanc)))
|
(define test-responsibles '((all ryanc)))
|
||||||
(define compile-omit-files '("test.rkt"))
|
|
||||||
|
|
|
@ -647,17 +647,25 @@
|
||||||
(tok (1 . (2 3)) (~datum (1 . (2 3))) 'ok)
|
(tok (1 . (2 3)) (~datum (1 . (2 3))) 'ok)
|
||||||
|
|
||||||
;; nullable EH pattern raises error on match (rather than diverging) (7/2016)
|
;; nullable EH pattern raises error on match (rather than diverging) (7/2016)
|
||||||
(tcerr "nullable"
|
(let ()
|
||||||
(syntax-parse #'(1 2 3)
|
;; to make drdr happy: use eval because compiling this code currently logs an error
|
||||||
[((~seq) ... n:nat ...) 'ok])
|
(define ns (make-base-namespace))
|
||||||
#rx"nullable ellipsis-head pattern|ellipsis-head pattern matched an empty sequence")
|
(eval '(require syntax/parse) ns)
|
||||||
(tcerr "nullable (dynamic)"
|
(tcerr "nullable"
|
||||||
(let ()
|
(eval
|
||||||
(define-splicing-syntax-class empty
|
'(syntax-parse #'(1 2 3)
|
||||||
(pattern (~seq)))
|
[((~seq) ... n:nat ...) 'ok])
|
||||||
(syntax-parse #'(1 2 3)
|
ns)
|
||||||
[((~seq e:empty) ... n:nat ...) 'ok]))
|
#rx"nullable ellipsis-head pattern|ellipsis-head pattern matched an empty sequence")
|
||||||
#rx"ellipsis-head pattern matched an empty sequence")
|
(tcerr "nullable (dynamic)"
|
||||||
|
(eval
|
||||||
|
'(let ()
|
||||||
|
(define-splicing-syntax-class empty
|
||||||
|
(pattern (~seq)))
|
||||||
|
(syntax-parse #'(1 2 3)
|
||||||
|
[((~seq e:empty) ... n:nat ...) 'ok]))
|
||||||
|
ns)
|
||||||
|
#rx"ellipsis-head pattern matched an empty sequence"))
|
||||||
|
|
||||||
;; nullable but bounded EH pattern ok (thanks Alex Knauth) (7/2016)
|
;; nullable but bounded EH pattern ok (thanks Alex Knauth) (7/2016)
|
||||||
(tok (1 2 3) ((~once (~seq)) ... n:nat ...) 'ok)
|
(tok (1 2 3) ((~once (~seq)) ... n:nat ...) 'ok)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user