Fixed bugs

This commit is contained in:
2026-06-26 02:04:33 +02:00
parent 9b7de09b0a
commit 46e9783257
8 changed files with 101 additions and 56 deletions
+5 -5
View File
@@ -188,18 +188,18 @@ impl GetMist for TypeExpr {
match lifetime {
Lifetime::Lifetime(v) => {
format!(
"{} &'{} {}",
"{} {} '{}&",
base,
v.get_mist(),
if *mutable { "mut" } else { "" }
if *mutable { "mut" } else { "" },
v.get_mist()
)
}
Lifetime::Unsafe => {
format!("{} *{}", base, if *mutable { "mut" } else { "const" })
format!("{} {} unsafe&", base, if *mutable { "mut" } else { "const" })
}
}
} else if *mutable {
format!("{} &mut", base)
format!("{} mut&", base)
} else {
format!("{}&", base)
}
+1
View File
@@ -69,6 +69,7 @@ impl GenMist for Statement {
body.gen_mist(ctx, cg);
cg.addln("");
} else {
ctx.expr_ensure_semicolon = false;
body.gen_mist(ctx, cg);
cg.addln(",");
}
+1 -1
View File
@@ -450,7 +450,7 @@ loop_stmt = {
pattern_list = { pattern ~ ("|" ~ pattern)* }
match_item = {
pattern_list ~ "=>" ~ (statement | (expr ~ ","))
pattern_list ~ "=>" ~ (block | (expr ~ ","))
}
match_stmt = {