[honu] ignore braces when computing syntax result for a pattern

This commit is contained in:
Jon Rafkind 2012-11-02 15:51:45 -06:00
parent 7ac80bbb01
commit 5d1bb74b42

View File

@ -391,7 +391,12 @@
(with-syntax ([(new-pattern ...) (convert-pattern honu-pattern mapping)]
[((withs ...) ...) (set->list withs)]
[(result-with ...) (if (syntax-e maybe-out)
(with-syntax ([(out ...) maybe-out])
(with-syntax ([(out ...)
(syntax-parse maybe-out
#:literal-sets (cruft)
[(#%braces what ...)
#'(what ...)])
])
#'(#:with result (parse-stuff honu-syntax (#%parens out ...))))
#'(#:with result #'()))])
(syntax/loc honu-pattern
@ -423,10 +428,11 @@
new-pattern ...
#;
[pattern (~seq new-pattern ...)
withs ... ...
result-with ...
])))))
[pattern x #:when (begin
(debug "All patterns failed for ~a\n" 'name)
#f)]
)))))
(debug "Output is ~a\n" (pretty-syntax output))
output)])))