Hacker News new | past | comments | ask | show | jobs | submit login

Macros in Rust don't need to be completely valid syntax. There are some requirements such as balanced parens and strings but the macro API is basically a token stream. The syntax requirements are just so that the compiler knows when the macro ends.

https://doc.rust-lang.org/1.7.0/book/macros.html#syntactic-r...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: