glsl icon indicating copy to clipboard operation
glsl copied to clipboard

Add missing do-while and for-init expr semicolons

Open pau101 opened this issue 3 years ago • 0 comments

Both do-while statements and expression for-init statements would be output with incorrect syntax by show_translation_unit.

This PR adds the missing semicolons as needed.

Example Input:

do {
  a();
} while (true);
int i;
for (i = 0; ; ) {
}

Before:

do {
a();
}
 while (true)
int i;
for (i = 0; ) {
}

After:

do {
a();
}
 while (true);
int i;
for (i = 0; ; ) {
}

pau101 avatar Aug 09 '21 21:08 pau101