diff options
author | Freya Murphy <freya@freyacat.org> | 2024-09-10 18:23:46 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-09-10 18:23:46 -0400 |
commit | 92a7e5853c6caeec09122c05ddbc19ae1498a0d8 (patch) | |
tree | d14a6a1c091df35c06ffb735ce3f6c72b1f37b42 /masm/lex.c | |
parent | relocation table hell (diff) | |
download | mips-92a7e5853c6caeec09122c05ddbc19ae1498a0d8.tar.gz mips-92a7e5853c6caeec09122c05ddbc19ae1498a0d8.tar.bz2 mips-92a7e5853c6caeec09122c05ddbc19ae1498a0d8.zip |
joe
Diffstat (limited to 'masm/lex.c')
-rw-r--r-- | masm/lex.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -19,7 +19,7 @@ static int lex_next(struct lexer *lexer) int c = getc(lexer->file); if (c == '\n') { - lexer->x = 0; + lexer->x = 1; lexer->y++; } else { lexer->x++; @@ -296,13 +296,13 @@ int lexer_init(const char *path, struct lexer *lexer) { FILE *file = fopen(path, "r"); if (file == NULL) { - ERROR_POS(pos, "cannot file '%s'", path); + ERROR("cannot read '%s'", path); return M_ERROR; } lexer->file = file; lexer->peek = EOF; - lexer->x = 0; - lexer->y = 0; + lexer->x = 1; + lexer->y = 1; return M_SUCCESS; } |