From 92a7e5853c6caeec09122c05ddbc19ae1498a0d8 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 10 Sep 2024 18:23:46 -0400 Subject: joe --- masm/lex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'masm/lex.c') diff --git a/masm/lex.c b/masm/lex.c index 06c7114..788523b 100644 --- a/masm/lex.c +++ b/masm/lex.c @@ -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; } -- cgit v1.2.3-freya