Skip to content
Snippets Groups Projects
Verified Commit 1dc36874 authored by Louis's avatar Louis :fire:
Browse files

Clean up main

parent 34808b2b
No related branches found
No related tags found
No related merge requests found
use crate::repl::Repl; use forge_script_lang::parse::parse_program;
use forge_script_lang::runtime::value::ForgeValue; use forge_script_lang::runtime::vm::{ChunkOps, Compiler};
use forge_script_lang::runtime::vm::{Chunk, ChunkOps, Forge, OpCode, VmResult};
mod repl; mod repl;
fn main() -> VmResult { fn main() {
let mut repl = Repl::new(); let program = "2+2";
repl.run(); let ast = parse_program(program).expect("Failed");
Ok(ForgeValue::Null)
// let mut chunk = Chunk::default();
// chunk.op_constant(ForgeValue::String(String::from("foo")));
// chunk.push_op(OpCode::Invert);
// chunk.push_op(OpCode::Return);
//
// let value = Forge::exec(chunk.as_ref());
// println!("{:?}", &value);
// value
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment