From 542547e1749f97f9e0b0bd1105f47a84e967243a 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 02:45:45 +0500 Subject: [PATCH] Add more binary operators --- src/compile.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/compile.c b/src/compile.c index 507d1ae..e11aa43 100644 --- a/src/compile.c +++ b/src/compile.c @@ -44,6 +44,20 @@ bool compile_isop(char* string) { else if (strcmp(string, "-") == 0) return true; else if (strcmp(string, "*") == 0) return true; else if (strcmp(string, "/") == 0) return true; + else if (strcmp(string, "**") == 0) return true; + else if (strcmp(string, "//") == 0) return true; + else if (strcmp(string, "%") == 0) return true; + else if (strcmp(string, ".") == 0) return true; + else if (strcmp(string, "~") == 0) return true; + else if (strcmp(string, "<") == 0) return true; + else if (strcmp(string, ">") == 0) return true; + else if (strcmp(string, "<=") == 0) return true; + else if (strcmp(string, ">=") == 0) return true; + else if (strcmp(string, "==") == 0) return true; + else if (strcmp(string, "!=") == 0) return true; + else if (strcmp(string, "and") == 0) return true; + else if (strcmp(string, "or") == 0) return true; + else if (strcmp(string, "|") == 0) return true; else return false;