3 releases
0.1.3 | Jul 19, 2022 |
---|---|
0.1.1 | Jul 19, 2022 |
0.1.0 | Jul 19, 2022 |
#796 in Procedural macros
8KB
166 lines
trigraph
Use trigraphs in rust:
use trigraph::trigraph;
trigraph! {
const HELLO_WORLD: &??(u8??) = &??(0x48u8, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x21??);
fn main() ??<
println!("??<??> nyaa??-", String::from_utf8_lossy(HELLO_WORLD));
??>
}
Limitations
This is mostly untested.
Does not work with ??'
since it interacts badly with the tokenizer because of the '
.
Does not work with differing delimiters like {
with ??>
or ??(
with ]
.