summary refs log tree commit diff
path: root/src/instruction/delete.c
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-03-23 21:11:13 +0300
committerNakidai <nakidai@disroot.org>2025-03-23 21:11:13 +0300
commitad9d6a199db7c28f8b20f131dfb55a26e0e251de (patch)
treee5bb112cd902d9c09f5ad79ce98ba8a315d20bbb /src/instruction/delete.c
parent159666bae6cc185a5abac154b85c49406f32f30c (diff)
download3cl-ad9d6a199db7c28f8b20f131dfb55a26e0e251de.tar.gz
3cl-ad9d6a199db7c28f8b20f131dfb55a26e0e251de.zip
Again...
Diffstat (limited to 'src/instruction/delete.c')
-rw-r--r--src/instruction/delete.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/instruction/delete.c b/src/instruction/delete.c
deleted file mode 100644
index 81e70f9..0000000
--- a/src/instruction/delete.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "3cl.h"
-
-#include <stdio.h>
-
-#include "readchar.h"
-#include "stack.h"
-#include "utils.h"
-#include "variable.h"
-
-
-struct CCLFrame *ccl_instruction_assign(struct CCL *ccl, struct CCLFrame *frame)
-{
-    if (ccl->stack.cur < 1)
-        die(1, "stack size is %d (%d required)", ccl->stack.cur, 1);
-
-    CCLNum value = ccl_stack_pop(&ccl->stack);
-
-    char name = ccl_readchar(ccl, frame, CCL_RC_CCL_VARUS);
-    if (name == '\0')
-        die(1, "Unexpected EOF");
-
-    if (name == '_')
-        return frame;
-
-    struct CCLVariable *var = ccl_variable_getany(ccl, frame, name);
-    if (var == NULL)
-        ccl_variable_set(&ccl->rootframe.vars, name, value);
-    else
-        var->value = value;
-
-    return frame;
-}