justanr / rustfuck

Implementing Brainfuck in Rust to learn Rust
MIT License
4 stars 0 forks source link

Fix op tracer #1

Open justanr opened 6 years ago

justanr commented 6 years ago

Need to push the result of a sub loop onto the results of its parent for a better picture of what is going on. Right now it looks like there's a bunch of tape moving that should be condensed into a single operation.

justanr commented 6 years ago

Also, not sure if the tracer is well thought out at all. Maybe a Vec of raw tokens that is collapsed into a string when the the tracer is completely closed...

But then more fighting with the borrow checker about where the hell the token lives.

justanr commented 6 years ago

Idea: Precompute trace table with parsed tokens and trigger a trace when entering a loop.