got all the load script stuff done.

added script args to main shell
also added userlib tests to ci
This commit is contained in:
Ava Apples Affine 2023-03-20 19:00:30 -07:00
parent 381852b3bd
commit 3f75157fac
Signed by: affine
GPG key ID: 3A4645B8CF806069
7 changed files with 122 additions and 49 deletions

View file

@ -16,6 +16,7 @@
*/
use crate::segment::{Ctr, Seg, Type};
use crate::run::{run_callback, RUN_DOCSTRING};
use crate::sym::{Args, SymTable, Symbol, ValueType};
use std::rc::Rc;
@ -582,6 +583,18 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
}
);
syms.insert(
"load".to_string(),
Symbol {
name: String::from("load"),
args: Args::Strict(vec![Type::String]),
conditional_branches: false,
docs: RUN_DOCSTRING.to_string(),
value: ValueType::Internal(Rc::new(run_callback)),
..Default::default()
}
);
Ok(())
}