From 5edcf05d7aa0cd75a941cb5df7ebbcbc346de6c4 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 19:00:24 +0500 Subject: [PATCH] Add "break" and "continue" --- src/compile.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/compile.c b/src/compile.c index 40b6ff5..2a1e005 100644 --- a/src/compile.c +++ b/src/compile.c @@ -420,6 +420,22 @@ char* compile(tSyntaxElement* syntaxtree) { compile_exit_tag(&result); + } else if (strcmp(token->content.string, "break") == 0) { + + compile_enter_tag(&result); + + string_append(&result, "break"); + + compile_exit_tag(&result); + + } else if (strcmp(token->content.string, "continue") == 0) { + + compile_enter_tag(&result); + + string_append(&result, "continue"); + + compile_exit_tag(&result); + } else if (strcmp(token->content.string, "formap") == 0) { compile_enter_tag(&result);