is faulty because #:literals (values) is misplaced. It should come before (stream elem-expr ...).
However, the error that occurs is very confusing.
elem-expr: misuse of an identifier (not in `racket', etc.) that is bound as a code-typesetting variable
When parsing the form, #:literals ... #:grammar ... becomes a part of the description because there is no constraint that the description must not be keywords.
The resulting expansion is (list #:literals .... #:grammar <grammar> ....), which happens to be valid, though <grammar> is not meant to be an expression. This is the cause of the mentioned confusing error message.
This PR adds the constraint that desc must be non-keyword, so that the above program errors appropriately on parsing.
The following program:
is faulty because
#:literals (values)
is misplaced. It should come before(stream elem-expr ...)
. However, the error that occurs is very confusing.elem-expr: misuse of an identifier (not in `racket', etc.) that is bound as a code-typesetting variable
When parsing the form,
#:literals ... #:grammar ...
becomes a part of the description because there is no constraint that the description must not be keywords. The resulting expansion is(list #:literals .... #:grammar <grammar> ....)
, which happens to be valid, though<grammar>
is not meant to be an expression. This is the cause of the mentioned confusing error message.This PR adds the constraint that desc must be non-keyword, so that the above program errors appropriately on parsing.