mention how to run bf in readme

This commit is contained in:
Sebastian Hugentobler 2025-05-28 22:01:40 +02:00
parent 97fdc89316
commit 2d62e8929a
Signed by: shu
SSH key fingerprint: SHA256:ppcx6MlixdNZd5EUM1nkHOKoyQYoJwzuQKXM6J/t66M
2 changed files with 10 additions and 1 deletions

View file

@ -25,5 +25,14 @@ Options:
-V, --version Print version -V, --version Print version
``` ```
For example running the
[Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)
implemented in [brainfuck](https://en.wikipedia.org/wiki/Brainfuck) (read the
source file to figure out how to use it):
```
RUST_LOG=info cargo run --release -- run -s ./lox/bf.lox -- bf/game_of_life.bf
```
Please note that some parts of the implementation have not been given enough Please note that some parts of the implementation have not been given enough
thought. thought.

View file

@ -46,7 +46,7 @@ pub struct Resolver<'a> {
interpreter: &'a mut Interpreter, interpreter: &'a mut Interpreter,
/// Track the type of the current function being resolved (regular, method, initializer, ...). /// Track the type of the current function being resolved (regular, method, initializer, ...).
current_fun: FunctionType, current_fun: FunctionType,
/// Tracks the type of the current class being resolved (regular, subclass, ...). /// Track the type of the current class being resolved (regular, subclass, ...).
current_class: ClassType, current_class: ClassType,
} }