expander: pay more attention to (error-print-source-location)
When source locations are disabled, don't include a source location in an error message from `raise-syntax-error`.
This commit is contained in:
parent
25b0c23db7
commit
3c69a1296a
|
@ -69,8 +69,9 @@
|
|||
(format "\n in: ~.s" (syntax->datum (datum->syntax #f expr))))
|
||||
""))
|
||||
(define src-loc-str
|
||||
(or (extract-source-location sub-expr)
|
||||
(extract-source-location expr)
|
||||
(or (and (error-print-source-location)
|
||||
(or (extract-source-location sub-expr)
|
||||
(extract-source-location expr)))
|
||||
""))
|
||||
(raise (exn:fail:syntax
|
||||
(string-append src-loc-str
|
||||
|
|
|
@ -12815,11 +12815,12 @@ static const char *startup_source =
|
|||
" #f)))"
|
||||
" (if or-part_151 or-part_151 \"\"))))"
|
||||
"(let-values(((src-loc-str_0)"
|
||||
"(let-values(((or-part_152)(extract-source-location sub-expr_6)))"
|
||||
"(if or-part_152"
|
||||
" or-part_152"
|
||||
"(let-values(((or-part_144)(extract-source-location expr_8)))"
|
||||
" (if or-part_144 or-part_144 \"\"))))))"
|
||||
"(let-values(((or-part_152)"
|
||||
"(if(error-print-source-location)"
|
||||
"(let-values(((or-part_144)(extract-source-location sub-expr_6)))"
|
||||
"(if or-part_144 or-part_144(extract-source-location expr_8)))"
|
||||
" #f)))"
|
||||
" (if or-part_152 or-part_152 \"\"))))"
|
||||
"(raise"
|
||||
"(exn:fail:syntax_0"
|
||||
" (string-append src-loc-str_0 name_26 \": \" message_12 at-message_0 in-message_0 message-suffix_2)"
|
||||
|
|
Loading…
Reference in New Issue
Block a user