aboutsummaryrefslogtreecommitdiff
path: root/src/as_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/as_parser.c')
-rw-r--r--src/as_parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/as_parser.c b/src/as_parser.c
index 990bc1c..17d0b87 100644
--- a/src/as_parser.c
+++ b/src/as_parser.c
@@ -14,7 +14,7 @@
// <stmt> ::= <label> <instr> | <instr> | <label>
// <instr> ::= <op> | <op> arg | <op> tag
// <label> ::= tag ":"
-// <op> ::= "add" | "sub" | "mul" | "div" | "mod" | "eq"
+// <op> ::= "add" | "sub" | "mul" | "div" | "mod" | "eq" | ...
Prog parseProg(Allocator alct, TokenStream ts) {
@@ -98,7 +98,7 @@ enum op parseOp(Allocator alct, TokenStream ts) {
enum op op;
if (t->type == OP) {
op = str2op(t->sval);
- if (op == OPEND) {
+ if (op == OP_END) {
fprintf(stderr, "%d:%d Invalid OP.\n", t->line, t->col);
exit(-1);
}
@@ -114,7 +114,7 @@ Instr parseInstr(Allocator alct, TokenStream ts) {
Instr i = allocate(alct, sizeof(struct instr));
i->tagName = NULL;
i->arg = NULL;
- i->op = OPEND;
+ i->op = OP_END;
if (t->type == OP) {
i->op = parseOp(alct, ts);
t = peekToken(alct, ts);