Skip to content

Commit

Permalink
Generate empty function bodies properly
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhutchings committed Nov 13, 2022
1 parent 97c2f84 commit a1756b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gen/gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ static void yf_gen_funcdecl(

fprintf(out, ") ");

yf_gen_node(node->body, out, i);
if (node->body == NULL)
fprintf(out, ";");
else
yf_gen_node(node->body, out, i);

}

Expand Down

0 comments on commit a1756b5

Please sign in to comment.