Modularized bracket style
This commit is contained in:
@@ -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("{");
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user