Skip to content

Commit

Permalink
Removing debug output, switch to normal
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwilliams committed Feb 19, 2020
1 parent 92a63b2 commit edab5ca
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions boa_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![warn(clippy::perf)]
#![allow(clippy::cognitive_complexity)]

use boa::{exec, exec::Executor, forward_val, realm::Realm};
use boa::{exec::Executor, forward_val, realm::Realm};
use std::{fs::read_to_string, path::PathBuf};
use structopt::StructOpt;

Expand All @@ -23,16 +23,12 @@ pub fn main() -> Result<(), std::io::Error> {

let buffer = read_to_string(args.file)?;

if args.shell {
let realm = Realm::create();
let mut engine = Executor::new(realm);
let realm = Realm::create();
let mut engine = Executor::new(realm);

match forward_val(&mut engine, &buffer) {
Ok(v) => print!("{}", v.to_string()),
Err(v) => eprint!("{}", v.to_string()),
}
} else {
dbg!(exec(&buffer));
match forward_val(&mut engine, &buffer) {
Ok(v) => print!("{}", v.to_string()),
Err(v) => eprint!("{}", v.to_string()),
}

Ok(())
Expand Down

0 comments on commit edab5ca

Please sign in to comment.