Modularized bracket style
This commit is contained in:
@@ -46,6 +46,11 @@ impl MistCodegen {
|
||||
self.add(&line);
|
||||
}
|
||||
|
||||
pub fn start_indent(&mut self) {
|
||||
self.addln("");
|
||||
self.add_indented("");
|
||||
}
|
||||
|
||||
pub fn start_bracket(&mut self) {
|
||||
self.addln("");
|
||||
self.add_indentedln("{");
|
||||
|
||||
@@ -78,8 +78,7 @@ impl GenMist for FunctionDecl {
|
||||
}
|
||||
|
||||
if let Some(body) = &self.body {
|
||||
cg.addln("");
|
||||
cg.add_indented("");
|
||||
cg.start_indent();
|
||||
body.gen_mist(ctx, cg);
|
||||
cg.addln("");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user