Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom punctuation containing $ #1609

Closed
fef1312 opened this issue Apr 3, 2024 · 2 comments · Fixed by #1611
Closed

Custom punctuation containing $ #1609

fef1312 opened this issue Apr 3, 2024 · 2 comments · Fixed by #1611

Comments

@fef1312
Copy link

fef1312 commented Apr 3, 2024

I'm trying to define this custom punctuation for my (yes, somewhat cursed) DSL:

custom_punctuation!(FMap, <$>);

but I get an error because the call to custom_punctuation_len! in the macro expansion doesn't have a rule matching the $ token. I don't know if this is intentional due to potential clashes with Rust's macro syntax, but I couldn't find a related issue and the docs don't seem to mention it, either. However, since Token![$] does work just fine, I feel like this should also work or at least have the documentation say it doesn't.

Thanks for this awesome library by the way, I really appreciate your work!

@dtolnay
Copy link
Owner

dtolnay commented Apr 3, 2024

I have published a fix in syn 2.0.58.

@fef1312
Copy link
Author

fef1312 commented Apr 3, 2024

Excellent, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants