posit-dev / air

22 stars 0 forks source link

Make backslash punctuation, not a token #13

Closed DavisVaughan closed 2 weeks ago

DavisVaughan commented 3 weeks ago

In https://github.com/DavisVaughan/air/pull/7/commits/225b5f9bebd8ba92220c329575d9ce7f64caa132 I figured out how to tweak the codegen to add support for punctuation that either Rust of quote! can't handle directly (there, [ and [[). That was exactly the problem I had before with backslashes, so we can use that here too.

(practically this doesn't change too much but does make backslash show up in is_punct() now, and allow you to do T!["\\"])