[go: up one dir, main page]

cross-posted from: https://lemmy.ml/post/21461907

So, this uses a macro, but if you鈥檙e thinking anything is possible with a macro, it鈥檚 actually not in Rust. The input does still need to parse as valid Rust tokens.

Which means the authors asked themselves at some point: Is the Rust syntax a superset of the Python syntax?
And well, it鈥檚 not. In particular, some Python keywords will just be tokenized as an identifier (like a variable name).

But it is close enough that the authors decided against requiring a massive string to be passed in, which does amuse me. 馃檭