Skip to content

Commit

Permalink
[ada] Fix indentation of generated declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
ojwb committed Oct 23, 2023
1 parent 67b5a45 commit 8865731
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/generator_ada.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static void write_declare(struct generator * g,
struct node * p) {
struct str * temp = g->outbuf;
g->outbuf = g->declarations;
write_string(g, " ");
write_string(g, " ");
writef(g, declaration, p);
write_string(g, ";");
write_newline(g);
Expand Down Expand Up @@ -138,7 +138,7 @@ static void write_savecursor(struct generator * g, struct node * p,
g->B[0] = str_data(savevar);
g->S[1] = "";
if (p->mode != m_forward) g->S[1] = "Z.L - ";
write_declare(g, " ~B0 : Char_Index", p);
write_declare(g, "~B0 : Char_Index", p);
writef(g, "~M~B0 := ~S1Z.C;~N" , p);
}

Expand Down Expand Up @@ -715,7 +715,7 @@ static void generate_atleast(struct generator * g, struct node * p) {
w(g, "~{");
g->B[0] = str_data(loopvar);

write_declare(g, " ~B0 : Integer", p);
write_declare(g, "~B0 : Integer", p);
w(g, "~M~B0 := ");
generate_AE(g, p->AE);
w(g, ";~N");
Expand Down Expand Up @@ -862,7 +862,7 @@ static void generate_setlimit(struct generator * g, struct node * p) {
struct str * varname = vars_newname(g);

g->B[0] = str_data(varname);
write_declare(g, " ~B0 : Integer", p);
write_declare(g, "~B0 : Integer", p);
if (p->left && p->left->type == c_tomark) {
/* Special case for:
*
Expand Down

0 comments on commit 8865731

Please sign in to comment.