53 lines
923 B
Rust
53 lines
923 B
Rust
#![allow(clippy::mutable_key_type)]
|
|
|
|
use talc_lang::{
|
|
symbol::{symbol, Symbol},
|
|
vm::Vm,
|
|
};
|
|
|
|
pub mod collection;
|
|
pub mod exception;
|
|
pub mod file;
|
|
pub mod format;
|
|
pub mod ints;
|
|
pub mod io;
|
|
pub mod iter;
|
|
pub mod math;
|
|
pub mod string;
|
|
pub mod value;
|
|
|
|
#[cfg(feature = "rand")]
|
|
pub mod random;
|
|
#[cfg(feature = "regex")]
|
|
pub mod regex;
|
|
|
|
pub fn load_all(vm: &mut Vm) {
|
|
collection::load(vm);
|
|
exception::load(vm);
|
|
file::load(vm);
|
|
format::load(vm);
|
|
io::load(vm);
|
|
iter::load(vm);
|
|
math::load(vm);
|
|
ints::load(vm);
|
|
string::load(vm);
|
|
value::load(vm);
|
|
|
|
#[cfg(feature = "rand")]
|
|
random::load(vm);
|
|
#[cfg(feature = "regex")]
|
|
regex::load(vm);
|
|
}
|
|
|
|
lazy_static::lazy_static! {
|
|
pub static ref SYM_IO_ERROR: Symbol = symbol!(io_error);
|
|
pub static ref SYM_FORMAT_ERROR: Symbol = symbol!(format_error);
|
|
}
|
|
|
|
macro_rules! unpack_args {
|
|
($e:expr) => {
|
|
($e).try_into().expect("bypassed arity check")
|
|
};
|
|
}
|
|
|
|
pub(crate) use unpack_args;
|