From 2d62e8929a9549d22027432c7587c3f2059682f8 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 28 May 2025 22:01:40 +0200 Subject: [PATCH] mention how to run bf in readme --- README.md | 9 +++++++++ src/resolver.rs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1fa0192..4f858c6 100644 --- a/README.md +++ b/README.md @@ -25,5 +25,14 @@ Options: -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 thought. diff --git a/src/resolver.rs b/src/resolver.rs index f777fd3..4fc44cd 100644 --- a/src/resolver.rs +++ b/src/resolver.rs @@ -46,7 +46,7 @@ pub struct Resolver<'a> { interpreter: &'a mut Interpreter, /// Track the type of the current function being resolved (regular, method, initializer, ...). 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, }