This commit is contained in:
Mark
2023-10-19 18:46:15 +02:00
parent 2d79e75ba2
commit b39a768099
22 changed files with 822 additions and 94 deletions

View File

@@ -85,17 +85,19 @@ fn main() {
run.run(&mut info_run);
}
Check::Yes | Check::Only => {
let rt = match run.check(&mut info_check, None) {
let return_type = match run.check(&mut info_check, None) {
Ok(v) => v,
Err(e) => {
eprintln!("check failed: {e}");
std::process::exit(36);
}
};
#[cfg(debug_assertions)]
dbg!(&return_type);
if args.check == Check::Yes {
run.run(&mut info_run);
} else {
eprintln!("return type is {}", rt)
eprintln!("return type is {}", return_type)
}
}
}

View File

@@ -1 +0,0 @@
("a").{ (a) -> a }

View File

@@ -1,28 +0,0 @@
list := (
1,
2,
3,
4,
5,
6,
7,
8,
9,
);
total := 0
t := &total
(list, item -> t = (t.deref, item).sum).iter
"total: ".print
total.println
"sum: ".print
list.sum.println
iter := (list item -> { item.println 12 }).map
"---".println
list := iter.as_list
list.println
list.sum.println
list.enumerate.as_list.println
"mers cli: ".print
mers_cli.println

View File

@@ -1,8 +0,0 @@
values := ().as_list
counter := 0
counter_ref := &counter
{val -> {
counter_ref = (counter_ref.deref, 1).sum
counter_ref.deref.println
if (counter_ref.deref, 5).eq { (()) } else { () }
}}.loop