first documentation run

This commit is contained in:
Sebastian Hugentobler 2025-05-26 12:24:35 +02:00
parent e065108f58
commit f59e6a5fd5
Signed by: shu
SSH key fingerprint: SHA256:ppcx6MlixdNZd5EUM1nkHOKoyQYoJwzuQKXM6J/t66M
21 changed files with 64 additions and 23 deletions

View file

@ -46,7 +46,7 @@ pub enum InterpreterError {
EnvironmentError(#[from] crate::environment::EnvironmentError),
}
/// Interpreter for the Lox language.
/// Interpreter for the Lox language that executes statements and evaluates expressions.
#[derive(Debug)]
pub struct Interpreter {
pub globals: Rc<RefCell<Environment>>,
@ -126,7 +126,7 @@ impl Interpreter {
}
/// Execute all statements within a block, using a new environment (with the old one as the
/// enclosing one). Immediately return the value if a Return Value is encountered after
/// enclosing one). Immediately return the value of a Return Value when it is encountered after
/// execution of a statement.
pub fn block(
&mut self,