From 8e9d0b5e9a4613e9ef980b5c0fd8e53f2c394195 Mon Sep 17 00:00:00 2001 From: A404M Date: Tue, 8 Oct 2024 19:58:00 +0330 Subject: fixed some bugs in fasm --- src/fasm/lexer/lexer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/fasm/lexer/lexer.c') diff --git a/src/fasm/lexer/lexer.c b/src/fasm/lexer/lexer.c index e3e9610..5a9e38e 100644 --- a/src/fasm/lexer/lexer.c +++ b/src/fasm/lexer/lexer.c @@ -316,12 +316,15 @@ FasmLines fasmLexerCode(Code *code, SourceCode *sourceCode) { } else { UNEXPECTED: fasmLinePrint(line); - printError("Unexpected character", sourceCode, iter, iter + 1); + printError("Unexpected character '%c'", sourceCode, iter, iter + 1, + *iter); goto RETURN_ERROR; } break; case FASM_LINE_LOOKING_FOR_INSTRUCTION: - if (fasmLexerIsWord(c)) { + if (fasmLexerIsLineSeparator(c)) { + continue; + } else if (fasmLexerIsWord(c)) { char *begin = iter; char *end = iter = fasmLexerGetNextWord(iter); line.end = end; -- cgit v1.2.3