blob: 8597d741b88df414e3b301a790dfb93e48c8294f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "instruction.h"
#include "3cl.h"
struct CCLFrame *ccl_instruction(struct CCL *ccl, struct CCLFrame *frame)
{
CCLInstruction instruction;
switch (ccl->code[frame->ep])
{
case '\n': /* FALLTHROUGH */
case ' ' : /* FALLTHROUGH */
case '\t': instruction = ccl_instruction_nop;
case '^' : instruction = ccl_instruction_pushzero;
case '+' : instruction = ccl_instruction_increment;
case '-' : instruction = ccl_instruction_decrement;
}
return instruction(ccl, frame);
}
|