diff options
| author | Nakidai <plaza521@inbox.ru> | 2024-08-24 14:29:55 +0300 |
|---|---|---|
| committer | Nakidai <plaza521@inbox.ru> | 2024-08-24 14:29:55 +0300 |
| commit | c74aea420c662039072f606b2d5ef1c73426e481 (patch) | |
| tree | 4790fa17644df9e11380d6c02b8928c923c20aba /include/instruction.h | |
| parent | 2b0e05cbc1e4d9beccd3a5867c8730880f6ecc10 (diff) | |
| download | 3cl-c74aea420c662039072f606b2d5ef1c73426e481.tar.gz 3cl-c74aea420c662039072f606b2d5ef1c73426e481.zip | |
Add more code
Add some funcitons to work with variables, add more instructions and add ability to stop the code from `ccl_instruction`
Diffstat (limited to 'include/instruction.h')
| -rw-r--r-- | include/instruction.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/instruction.h b/include/instruction.h index 449c760..63f28b2 100644 --- a/include/instruction.h +++ b/include/instruction.h @@ -3,14 +3,15 @@ #include "3cl.h" - +/**< Type for every instruction in 3cl */ typedef struct CCLFrame *(*CCLInstruction)(struct CCL *ccl, struct CCLFrame *frame); -struct CCLFrame *ccl_instruction_nop(struct CCL *ccl, struct CCLFrame *frame); -struct CCLFrame *ccl_instruction_pushzero(struct CCL *ccl, struct CCLFrame *frame); -struct CCLFrame *ccl_instruction_increment(struct CCL *ccl, struct CCLFrame *frame); -struct CCLFrame *ccl_instruction_decrement(struct CCL *ccl, struct CCLFrame *frame); - +/** + * Execute next instruction + * @param ccl CCL instance + * @param frame Current frame + * @return Updated frame + */ struct CCLFrame *ccl_instruction(struct CCL *ccl, struct CCLFrame *frame); #endif /* __CCL_INSTRUCTION_H__ */ |