V7: Make .try a language feature, this makes try_allow_unused unnecessary. remove try and try_... functions.

This commit is contained in:
Mark
2024-03-22 15:38:09 +01:00
parent 86b6a46d09
commit 8690263b1c
13 changed files with 334 additions and 208 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "mers"
version = "0.6.0"
version = "0.7.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "dynamically typed but type-checked programming language"
@@ -11,7 +11,7 @@ repository = "https://github.com/Dummi26/mers"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
mers_lib = "0.6.0"
mers_lib = "0.7.0"
# mers_lib = { path = "../mers_lib" }
clap = { version = "4.3.19", features = ["derive"] }
colored = "2.1.0"

View File

@@ -84,13 +84,13 @@ fn main() {
exit(20);
}
Ok(parsed) => {
let (mut i1, _, mut i3) = config.infos();
match parsed.compile(&mut i1, CompInfo::default()) {
let (i1, _, i3) = config.infos();
match compile(&*parsed, i1) {
Err(e) => {
eprintln!("{e}");
exit(24);
}
Ok(compiled) => match compiled.check(&mut i3, None) {
Ok(compiled) => match check(&*compiled, i3) {
Err(e) => {
eprintln!("{e}");
exit(28);
@@ -110,13 +110,13 @@ fn main() {
exit(255);
}
Ok(parsed) => {
let (mut i1, mut i2, mut i3) = config.infos();
match parsed.compile(&mut i1, CompInfo::default()) {
let (i1, mut i2, i3) = config.infos();
match compile(&*parsed, i1) {
Err(e) => {
eprintln!("{e}");
exit(255);
}
Ok(compiled) => match compiled.check(&mut i3, None) {
Ok(compiled) => match check(&*compiled, i3) {
Err(e) => {
eprintln!("{e}");
exit(255);
@@ -138,8 +138,8 @@ fn main() {
exit(255);
}
Ok(parsed) => {
let (mut i1, mut i2, _) = config.infos();
match parsed.compile(&mut i1, CompInfo::default()) {
let (i1, mut i2, _) = config.infos();
match compile(&*parsed, i1) {
Err(e) => {
eprintln!("{e}");
exit(255);