Modularized bracket style

This commit is contained in:
2026-06-28 15:16:33 +02:00
parent 41f8b94c82
commit 31eebb4baa
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -46,6 +46,11 @@ impl MistCodegen {
self.add(&line); self.add(&line);
} }
pub fn start_indent(&mut self) {
self.addln("");
self.add_indented("");
}
pub fn start_bracket(&mut self) { pub fn start_bracket(&mut self) {
self.addln(""); self.addln("");
self.add_indentedln("{"); self.add_indentedln("{");
+1 -2
View File
@@ -78,8 +78,7 @@ impl GenMist for FunctionDecl {
} }
if let Some(body) = &self.body { if let Some(body) = &self.body {
cg.addln(""); cg.start_indent();
cg.add_indented("");
body.gen_mist(ctx, cg); body.gen_mist(ctx, cg);
cg.addln(""); cg.addln("");
} else { } else {