got all the load script stuff done.
added script args to main shell also added userlib tests to ci
This commit is contained in:
parent
381852b3bd
commit
3f75157fac
7 changed files with 122 additions and 49 deletions
13
src/stl.rs
13
src/stl.rs
|
|
@ -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(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue