Fixing srcloc on module expressions because srclocs come from the cons

This commit is contained in:
Jay McCarthy 2010-10-15 13:07:56 -06:00
parent 4528c7657a
commit 05dc137ca0

View File

@ -329,10 +329,12 @@
(raise-syntax-error 'allocator-setup "expected a literal number" #'heap-size)))] (raise-syntax-error 'allocator-setup "expected a literal number" #'heap-size)))]
[_ [_
(raise-syntax-error 'mutator allocator-setup-error-msg (syntax/loc #'setup (allocator-setup . setup)))]) (raise-syntax-error 'mutator allocator-setup-error-msg (syntax/loc #'setup (allocator-setup . setup)))])
#`(#%module-begin (quasisyntax/loc stx
(#%module-begin
#,(allocator-setup-internal #'setup) #,(allocator-setup-internal #'setup)
(mutator-top-interaction . module-expr) #,@(for/list ([me (in-list (syntax->list #'(module-expr ...)))])
...))] (quasisyntax/loc me
(mutator-top-interaction . #,me))))))]
[(_ first-expr module-expr ...) [(_ first-expr module-expr ...)
(raise-syntax-error 'mutator allocator-setup-error-msg #'first-expr)] (raise-syntax-error 'mutator allocator-setup-error-msg #'first-expr)]
[(_) [(_)