Skip to content

Commit

Permalink
Some minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-siebert committed Feb 3, 2024
1 parent feadecb commit 536c60e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rlox-cli/src/bin/rlox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ use std::fs;
use std::io::{stdout, Write};
use std::rc::Rc;

struct LoxEnvironment<'a> {
struct LoxRuntime<'a> {
interpreter: Rc<Interpreter<'a>>,
}

impl LoxEnvironment<'_> {
impl LoxRuntime<'_> {
fn new() -> Self {
LoxEnvironment {
LoxRuntime {
interpreter: Rc::new(Interpreter::new(Rc::new(RefCell::new(stdout())))),
}
}
Expand Down Expand Up @@ -75,7 +75,7 @@ struct Args {

fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Args::parse();
let environment = LoxEnvironment::new();
let environment = LoxRuntime::new();

match args.script {
Some(script_file) => environment.run_file(script_file),
Expand Down

0 comments on commit 536c60e

Please sign in to comment.