BrainFuck compiler using Rust proc macro
More precisely, the BrainFuck-to-Rust transpiler using Rust proc macro
Examples:
- Runs on
into
called (usinginto
method to obtain(pc: usize, mem: Vec<u8>)
)let = brain_fuck!.into; println!;
- Runs on
env
called (env
method setspc
andmem
for the block) (env
method also returns(pc: usize, mem: Vec<u8>)
)let mut pc = 0; let mut mem = vec!; let = brain_fuck!.env; println!;
- Runs on drop
brain_fuck!;