fixed macro stepper bug

Merge to release branch

original commit: 2c1d49de6f4b10f8ea921a5c6fc03729c72878d4
This commit is contained in:
Ryan Culpepper 2011-02-04 15:35:51 -07:00
parent 139cc91b33
commit 1329bb13fb

View File

@ -1,5 +1,6 @@
#lang racket/base #lang racket/base
(require racket/match (require racket/match
(for-syntax racket/base)
"../util/eomap.rkt" "../util/eomap.rkt"
"stx-util.rkt" "stx-util.rkt"
"deriv-util.rkt" "deriv-util.rkt"
@ -34,9 +35,16 @@
;; Syntax ;; Syntax
(define-syntax-rule (match/count x . clauses) (define-syntax-rule (match/count x clause ...)
(begin (sequence-number (add1 (sequence-number))) (begin (sequence-number (add1 (sequence-number)))
(match x . clauses))) (let ([v x])
(match v
clause ...
[_ (error 'match "failed to match ~e at line ~s" v (line-of x))]))))
(define-syntax (line-of stx)
(syntax-case stx ()
[(line-of x) #`(quote #,(syntax-line #'x))]))
;; Derivations => Steps ;; Derivations => Steps
@ -472,7 +480,10 @@
;; Add remark step? ;; Add remark step?
]] ]]
[(struct local-remark (contents)) [(struct local-remark (contents))
(R [#:reductions (list (walk/talk 'remark contents))])])) (R [#:reductions (list (walk/talk 'remark contents))])]
[#f
(R)]))
;; List : ListDerivation -> RST ;; List : ListDerivation -> RST
(define (List ld) (define (List ld)