From eda259dfbf5f73fc30fd2cd9c365d0907d9a3004 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:51:37 +0500 Subject: [PATCH] Add print keyword --- src/compile.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/compile.c b/src/compile.c index e11aa43..eefbaf1 100644 --- a/src/compile.c +++ b/src/compile.c @@ -155,6 +155,14 @@ char* compile(tSyntaxElement* syntaxtree) { compile_exit_tag(&result); + } else + + if (strcmp(token->content.string, "print") == 0) { + + string_append(&result, "{{"); + string_append(&result,compile_expression(token->next)); + string_append(&result, "}}"); + } }