1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
pub mod cmd;
pub mod assembler;
pub mod builder;


pub const STD_LIBRARY: &'static str = r#"
std = dict();
std["io"] = dict();
std["io"]["print"] = print;
std["io"]["println"] = println;
std["io"]["format"] = format;

std["object"] = dict();
std["object"]["new"] = new;

std["math"] = dict();
std["math"]["add"] = add;
std["math"]["sub"] = sub;
std["math"]["div"] = div;
std["math"]["mul"] = mul;
std["math"]["rem"] = rem;
std["math"]["not"] = not;
std["math"]["eq"] = eq;
std["math"]["neq"] = neq;

std["list"] = dict();
std["list"]["len"] = len;
std["list"]["push"] = push;
std["list"]["pop"] = pop;
std["list"]["range"] = range;
std["list"]["reverse"] = reverse;
std["list"]["map"] = map;
std["list"]["filter"] = filter;
std["list"]["reduce"] = reduce;

"#;