summary refs log tree commit diff
path: root/src/instruction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/instruction.c')
-rw-r--r--src/instruction.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/instruction.c b/src/instruction.c
deleted file mode 100644
index 4189dd1..0000000
--- a/src/instruction.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "instruction.h"
-#include "instructions.h"
-
-#include <stdbool.h>
-#include <stdio.h>
-
-#include "readchar.h"
-#include "3cl.h"
-
-
-struct CCLFrame *ccl_instruction(struct CCL *ccl, struct CCLFrame *frame)
-{
-    CCLInstruction instruction;
-    char chr = ccl_readchar(ccl, frame, CCL_RC_CCL_INSTR);
-
-    if (chr == '\0')
-    {
-        ccl->stopped = true;
-        return INST(nop)(ccl, frame);
-    }
-
-#define ISSW(NAME) instruction = INST(NAME); break
-    switch (chr)
-    {
-    case '\n': /* FALLTHROUGH */
-    case ' ' : /* FALLTHROUGH */
-    case '\t': ISSW(nop);
-    case '^' : ISSW(pushzero);
-    case '+' : ISSW(increment);
-    case '-' : ISSW(decrement);
-    case '*' : ISSW(add);
-    case '~' : ISSW(subtract);
-    case '%' : ISSW(reverse);
-    case '=' : ISSW(assign);
-    default  : ISSW(invalid);
-    }
-#undef INSW
-    return instruction(ccl, frame);
-    puts("aboba");
-}