mtots_core 0.1.2

Core implementation of the mtots scripting language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

pub(super) fn new() -> Rc<Class> {
    Class::new(
        "Iterable".into(),
        Class::map_from_funcs(vec![NativeFunction::new(
            "iter",
            ["self"],
            "",
            |globals, args, _| {
                let owner = args.into_iter().next().unwrap();
                owner.iter(globals)
            },
        )]),
        HashMap::new(),
    )
}