#![allow(dead_code, unused_imports, unused_variables)]
pub mod ast;
pub mod lexer;
pub mod parser;
pub mod runtime;
pub mod value;
pub use ast::AstNode;
pub use lexer::{Lexer, Token};
pub use parser::Parser;
pub use runtime::{ExecutionEvent, Runtime};
pub use value::Value;
pub type CommandExecutor = Box<dyn Fn(&str) -> (bool, String, String) + Send + Sync>;
pub fn run(source: &str) -> Result<Value, String> {
let mut lexer = Lexer::new(source);
let tokens = lexer.tokenize();
let mut parser = Parser::new(tokens);
let ast = parser.parse()?;
let mut runtime = Runtime::new();
runtime.execute(&ast)
}