Add x64 emitter tests

This commit is contained in:
Krzosa Karol
2026-05-23 08:35:43 +02:00
parent a0adc03bcb
commit 0058355611
4 changed files with 25 additions and 54 deletions

19
lex.c
View File

@@ -44,24 +44,7 @@ void lex_advance(Lexer *lex) {
lex->column++;
}
if (*lex->at == '\\') {
lex->at += 1;
if ((lex->at < lex->end) && *lex->at == '\n') {
lex->at += 1;
lex->line += 1; lex->column = 0;
} else if ((lex->at < lex->end) && *lex->at == '\r') {
lex->at += 1;
if ((lex->at < lex->end) && *lex->at == '\n') {
lex->at += 1;
lex->line += 1; lex->column = 0;
} else {
panicf("after \\r missing \\n");
}
} else {
panicf("stray '\\' without follow up new line");
}
} else if (*lex->at == '\n') {
if (*lex->at == '\n') {
lex->preproc = false;
lex->at += 1;
} else {