feat: most basic cli

co-authored by electria
This commit is contained in:
Edeth-Baguette 2026-07-13 17:19:01 -07:00
commit 580300a205
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,7 @@
use std::env;
mod parse;
fn main() {
println!("Hello, world!");
println!("{}", parse::parse(env::args().nth(1).unwrap().as_ref()));
}

View file

@ -313,6 +313,10 @@ fn nodes_to_num(mut nodes: Vec<Node>) -> Float {
}
}
pub fn parse(s: &str) -> Float {
nodes_to_num(nodes_from_str(s).unwrap())
}
#[test]
fn test_nodes_to_num() {
assert_eq!(