Handling both #[x] and #[x("y")]

I have a procedural macro that I would like to work
with and without an argument, like this:

#[x]
and
#[x("y")]

Is there some way to handle both cases so as to avoid
error: unexpected end of input, expected expression
when I use the argument-less version?

is_empty!

3 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.