From 4cc53658a9503191f41945914e6223ccc5a95717 Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Tue, 5 Jun 2018 23:03:13 +0200 Subject: While handling --- src/generator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/generator.c') diff --git a/src/generator.c b/src/generator.c index 3ecfe0d..dc85517 100644 --- a/src/generator.c +++ b/src/generator.c @@ -266,7 +266,7 @@ void gen_or(int left, int right, int idx) { fprintf(output, "jmp .false%d\n", idx); fprintf(output, ".true%d:\n", idx); fprintf(output, "push 1\n"); - fprintf(output, ".false%d:", idx); + fprintf(output, ".false%d:\n", idx); } void gen_and(int left, int right, int idx) { @@ -284,7 +284,7 @@ void gen_and(int left, int right, int idx) { fprintf(output, "jmp .true%d\n", idx); fprintf(output, ".false%d:\n", idx); fprintf(output, "push 0\n"); - fprintf(output, ".true%d:", idx); + fprintf(output, ".true%d:\n", idx); } void gen_eq(const char op[], int left, int right, int idx) { @@ -300,7 +300,7 @@ void gen_eq(const char op[], int left, int right, int idx) { else exit(1); // TODO: error on unexpected op - fprintf(output, "push 0\njmp .false%d\n.true%d:\npush 1\n.false%d:", idx, idx, + fprintf(output, "push 0\njmp .false%d\n.true%d:\npush 1\n.false%d:\n", idx, idx, idx); } @@ -321,7 +321,7 @@ void gen_order(const char op[], int left, int right, int idx) { else exit(1); // TODO: error on unexpected op - fprintf(output, "push 0\njmp .false%d\n.true%d:\npush 1\n.false%d:", idx, idx, + fprintf(output, "push 0\njmp .false%d\n.true%d:\npush 1\n.false%d:\n", idx, idx, idx); } -- cgit v1.2.3