Working mapgen and fixed indentation
This commit is contained in:
@@ -73,7 +73,7 @@ impl GenRust for ImplDecl {
|
||||
|
||||
impl GenRust for FunctionDecl {
|
||||
fn gen_rust(&self, ctx: &mut Context, cg: &mut RustCodegen) {
|
||||
cg.add(&format!(
|
||||
cg.add_indented(&format!(
|
||||
"{}fn {}{}(",
|
||||
self.visibility.get_rust(),
|
||||
self.name.get_rust(),
|
||||
@@ -97,8 +97,9 @@ impl GenRust for FunctionDecl {
|
||||
if let Some(body) = &self.body {
|
||||
cg.add(" ");
|
||||
body.gen_rust(ctx, cg);
|
||||
cg.addln("");
|
||||
} else {
|
||||
cg.add(";");
|
||||
cg.addln(";");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user