From 57af99e53aba4e0a1305cdb271387573b5b3f6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Tue, 11 Jun 2024 16:02:51 +0500 Subject: [PATCH] Change formating a bit --- src/compile.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/compile.c b/src/compile.c index 97db9c6..74fcb14 100644 --- a/src/compile.c +++ b/src/compile.c @@ -238,9 +238,7 @@ char* compile(tSyntaxElement* syntaxtree) { tSyntaxElement* token = syntaxtree->content.syntax; if (strcmp(token->content.string, "def") == 0) { - } else - - if (strcmp(token->content.string, "set") == 0) { + } else if (strcmp(token->content.string, "set") == 0) { compile_enter_tag(&result); @@ -251,9 +249,7 @@ char* compile(tSyntaxElement* syntaxtree) { compile_exit_tag(&result); - } else - - if (strcmp(token->content.string, "global") == 0) { + } else if (strcmp(token->content.string, "global") == 0) { compile_enter_tag(&result); @@ -264,9 +260,7 @@ char* compile(tSyntaxElement* syntaxtree) { compile_exit_tag(&result); - } else - - if (strcmp(token->content.string, "do") == 0) { + } else if (strcmp(token->content.string, "do") == 0) { compile_enter_tag(&result); @@ -275,9 +269,7 @@ char* compile(tSyntaxElement* syntaxtree) { compile_exit_tag(&result); - } else - - if (strcmp(token->content.string, "if") == 0) { + } else if (strcmp(token->content.string, "if") == 0) { compile_enter_tag(&result); @@ -304,9 +296,7 @@ char* compile(tSyntaxElement* syntaxtree) { compile_exit_tag(&result); - } else - - if (strcmp(token->content.string, "print") == 0) { + } else if (strcmp(token->content.string, "print") == 0) { string_append(&result, "{{"); string_append(&result,compile_expression(token->next));