aboutsummaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorMarvin Borner2021-04-21 00:05:04 +0200
committerMarvin Borner2021-04-21 00:05:04 +0200
commitc219c38e854fe15bc47519d2df0d6cbd7bab2ab7 (patch)
tree239b84c05371b4e853b40ebb52b1ad744fe0fc53 /src/parser.c
parentf31fc8b66eee149bd78603996f34264be8fad411 (diff)
Started syntax highlighting
doesn't work but don't want to fix lel.
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parser.c b/src/parser.c
index 2e8894b..2f16323 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -383,6 +383,7 @@ static u32 parse_line(struct context *ctx, char *str, u32 size)
struct token tok = token_resolve(str + str_ind, size - str_ind);
if (tok.type == NEWLINE) {
ctx->line++;
+ ctx->column = 0;
break;
}
@@ -602,6 +603,14 @@ static u32 parse_line(struct context *ctx, char *str, u32 size)
case BIT:
warnings_add(ctx, "Random non-instruction found");
break;
+ case INSTR_START:
+ case INSTR_END:
+ case NUM_START:
+ case NUM_END:
+ case REGS_START:
+ case REGS_END:
+ warnings_add(ctx, "Got enum boundary");
+ break;
default:
warnings_add(ctx, "Super-unknown instruction");
break;