fixed broken syntax error checks
svn: r14187
This commit is contained in:
parent
8e175869d9
commit
afc5ad8d83
|
@ -81,7 +81,8 @@
|
||||||
(((special) act)
|
(((special) act)
|
||||||
(not (ormap
|
(not (ormap
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
(module-or-top-identifier=? (syntax special) x))
|
(and (identifier? #'special)
|
||||||
|
(module-or-top-identifier=? (syntax special) x)))
|
||||||
ids)))
|
ids)))
|
||||||
(_ #t)))
|
(_ #t)))
|
||||||
spec/re-act-lst))
|
spec/re-act-lst))
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
(module actions mzscheme
|
#lang scheme/base
|
||||||
(provide (all-defined))
|
|
||||||
(require syntax/stx)
|
|
||||||
|
|
||||||
;; get-special-action: (syntax-object list) syntax-object syntax-object -> syntax-object
|
(provide (all-defined-out))
|
||||||
;; Returns the first action from a rule of the form ((which-special) action)
|
(require syntax/stx)
|
||||||
(define (get-special-action rules which-special none)
|
|
||||||
(cond
|
|
||||||
((null? rules) none)
|
|
||||||
(else
|
|
||||||
(syntax-case (car rules) ()
|
|
||||||
(((special) act)
|
|
||||||
(module-or-top-identifier=? (syntax special) which-special)
|
|
||||||
(syntax act))
|
|
||||||
(_ (get-special-action (cdr rules) which-special none))))))
|
|
||||||
|
|
||||||
|
;; get-special-action: (syntax-object list) syntax-object syntax-object -> syntax-object
|
||||||
|
;; Returns the first action from a rule of the form ((which-special) action)
|
||||||
)
|
(define (get-special-action rules which-special none)
|
||||||
|
(cond
|
||||||
|
((null? rules) none)
|
||||||
|
(else
|
||||||
|
(syntax-case (car rules) ()
|
||||||
|
(((special) act)
|
||||||
|
(and (identifier? #'special) (module-or-top-identifier=? (syntax special) which-special))
|
||||||
|
(syntax act))
|
||||||
|
(_ (get-special-action (cdr rules) which-special none))))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user