resyntax icon indicating copy to clipboard operation
resyntax copied to clipboard

define-syntax-parser-to-define-syntax-parse-rule-simple ignores syntax/loc on the output

Open benknoble opened this issue 3 months ago • 1 comments

See https://github.com/jackfirth/resyntax/blob/43f5fc6153b1d1dc9fff65a23391c4aac604fb22/default-recommendations/syntax-parse-shortcuts.rkt#L48 and https://github.com/benknoble/frosthaven-manager/pull/126

benknoble avatar Nov 15 '25 21:11 benknoble

Looks like this logic is wrong. It should only match when the last body form is wrapped in syntax, not always match and then strip the syntax if it's present.

This is a bug that was also present in the other define-syntax-parse-rule shortcut initially. When I was fixing that in Copilot's implementation, I failed to notice the other rule had the same problem.

jackfirth avatar Nov 16 '25 01:11 jackfirth