aboutsummaryrefslogtreecommitdiff
path: root/asm/parser.c
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-11-01 18:09:00 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-11-01 18:09:00 +0000
commit83678ad29a03623d7c13771c0bfa36657b554db4 (patch)
tree8b97bb9a3e6ea9b5a50b249ad76dd49c034205b3 /asm/parser.c
parent4be04d2518fc342300685fa11d514beb7e06022b (diff)
downloadovm-83678ad29a03623d7c13771c0bfa36657b554db4.tar.gz
ovm-83678ad29a03623d7c13771c0bfa36657b554db4.tar.bz2
ovm-83678ad29a03623d7c13771c0bfa36657b554db4.zip
Add MULT to lexer and parser for assembler
Diffstat (limited to 'asm/parser.c')
-rw-r--r--asm/parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/asm/parser.c b/asm/parser.c
index a6ddd86..41ffdb9 100644
--- a/asm/parser.c
+++ b/asm/parser.c
@@ -194,7 +194,6 @@ perr_t parse_type_inst_with_operand(token_stream_t *stream, inst_t *ret)
perr_t parse_next_inst(token_stream_t *stream, inst_t *ret)
{
- static_assert(NUMBER_OF_OPCODES == 70, "parse_next_inst: Out of date!");
const token_t token = TOKEN_STREAM_AT(stream->data, stream->used);
switch (token.type)
{
@@ -252,6 +251,9 @@ perr_t parse_next_inst(token_stream_t *stream, inst_t *ret)
case TOKEN_PLUS:
ret->opcode = OP_PLUS_BYTE;
return parse_utype_inst(stream, ret);
+ case TOKEN_MULT:
+ ret->opcode = OP_MULT_BYTE;
+ return parse_utype_inst(stream, ret);
case TOKEN_PRINT:
ret->opcode = OP_PRINT_BYTE;
return parse_type_inst(stream, ret);