align not mutable correctly

This commit is contained in:
Daniel Gavin
2021-04-22 00:23:17 +02:00
parent 9b8563dfc0
commit de1838c0cb
2 changed files with 22 additions and 6 deletions
+2 -2
View File
@@ -424,11 +424,12 @@ visit_decl :: proc(p: ^Printer, decl: ^ast.Decl, called_in_stmt := false) {
visit_exprs(p, v.names, true);
hint_current_line(p, {.Value_Decl});
if v.type != nil {
if !v.is_mutable {
push_generic_token(p, .Colon, 0);
} else {
hint_current_line(p, {.Value_Decl});
push_generic_token(p, .Colon, 0);
}
@@ -438,7 +439,6 @@ visit_decl :: proc(p: ^Printer, decl: ^ast.Decl, called_in_stmt := false) {
push_generic_token(p, .Colon, 1);
push_generic_token(p, .Colon, 0);
} else {
hint_current_line(p, {.Value_Decl});
push_generic_token(p, .Colon, 1);
}
}