Browse Source

Removing debug output, switch to normal

pull/256/head
Jason Williams 5 years ago
parent
commit
edab5ca6cc
  1. 16
      boa_cli/src/main.rs

16
boa_cli/src/main.rs

@ -2,7 +2,7 @@
#![warn(clippy::perf)] #![warn(clippy::perf)]
#![allow(clippy::cognitive_complexity)] #![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 std::{fs::read_to_string, path::PathBuf};
use structopt::StructOpt; use structopt::StructOpt;
@ -23,16 +23,12 @@ pub fn main() -> Result<(), std::io::Error> {
let buffer = read_to_string(args.file)?; let buffer = read_to_string(args.file)?;
if args.shell { let realm = Realm::create();
let realm = Realm::create(); let mut engine = Executor::new(realm);
let mut engine = Executor::new(realm);
match forward_val(&mut engine, &buffer) { match forward_val(&mut engine, &buffer) {
Ok(v) => print!("{}", v.to_string()), Ok(v) => print!("{}", v.to_string()),
Err(v) => eprint!("{}", v.to_string()), Err(v) => eprint!("{}", v.to_string()),
}
} else {
dbg!(exec(&buffer));
} }
Ok(()) Ok(())

Loading…
Cancel
Save