From 853b44ba5b1d64070017336c1a480256afbfd0b2 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 28 Apr 2024 15:54:11 +0200 Subject: rebel-lang: scope: rename Context::run() to execute() --- crates/rebel-lang/examples/repl.rs | 2 +- crates/rebel-lang/src/scope.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates') diff --git a/crates/rebel-lang/examples/repl.rs b/crates/rebel-lang/examples/repl.rs index 4554486..a07c802 100644 --- a/crates/rebel-lang/examples/repl.rs +++ b/crates/rebel-lang/examples/repl.rs @@ -98,7 +98,7 @@ fn main() { continue; } - let value = match ctx.run(&stmt) { + let value = match ctx.execute(&stmt) { Ok(value) => value, Err(err) => { println!("Eval error: {err:?}"); diff --git a/crates/rebel-lang/src/scope.rs b/crates/rebel-lang/src/scope.rs index 1d574b3..420c88f 100644 --- a/crates/rebel-lang/src/scope.rs +++ b/crates/rebel-lang/src/scope.rs @@ -15,7 +15,7 @@ pub struct Context { } impl Context { - pub fn run(&mut self, stmt: &ast::BodyStmt) -> value::Result { + pub fn execute(&mut self, stmt: &ast::BodyStmt) -> value::Result { match stmt { ast::BodyStmt::Assign { dest, expr } => { let value = Value::eval(self, expr)?; -- cgit v1.2.3