diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2024-10-08 19:58:00 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2024-10-08 19:58:00 +0330 |
commit | 8e9d0b5e9a4613e9ef980b5c0fd8e53f2c394195 (patch) | |
tree | 5d0dba6505fd0a7aed7cba79558563a323f8092b /src/fasm/lexer | |
parent | addd54dc31603dc204773d3108dba4e000cd7657 (diff) |
Diffstat (limited to 'src/fasm/lexer')
-rw-r--r-- | src/fasm/lexer/lexer.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; |