diff options
| author | Nakidai <nakidai@disroot.org> | 2025-03-23 21:11:13 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2025-03-23 21:11:13 +0300 |
| commit | ad9d6a199db7c28f8b20f131dfb55a26e0e251de (patch) | |
| tree | e5bb112cd902d9c09f5ad79ce98ba8a315d20bbb /src/instruction.c | |
| parent | 159666bae6cc185a5abac154b85c49406f32f30c (diff) | |
| download | 3cl-ad9d6a199db7c28f8b20f131dfb55a26e0e251de.tar.gz 3cl-ad9d6a199db7c28f8b20f131dfb55a26e0e251de.zip | |
Again...
Diffstat (limited to 'src/instruction.c')
| -rw-r--r-- | src/instruction.c | 40 |
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"); -} |