working on template stuff, add log flush

This commit is contained in:
Krzosa Karol
2025-01-21 16:02:09 +01:00
parent 515737f477
commit adb30cf24d
8 changed files with 91 additions and 72 deletions

View File

@@ -209,6 +209,7 @@ fn void lex_token_ex(lexer_t *lex, lex_t *token) {
case ',': token->kind = lex_kind_comma; break;
case '@': token->kind = lex_kind_tag; break;
case '?': token->kind = lex_kind_question; break;
case '\\': token->kind = lex_kind_escape; break;
case '"': lex_eat_string(lex, token); break;
case '`': lex_eat_string(lex, token); break;
case '\'': lex_eat_string(lex, token); break;

View File

@@ -57,6 +57,7 @@ enum lex_kind_t {
X(lex_kind_arrow , "'->' arrow" , "->" )\
X(lex_kind_question , "'?' question mark" , "?" )\
X(lex_kind_tag , "'@' tag sign" , "@" )\
X(lex_kind_escape , "'\' escape" , "\\" )\
X(lex_kind_preproc_null , "preproc_null" , "---" )\
X(lex_kind_preproc_define , "preproc_define" , "---" )\
X(lex_kind_preproc_ifdef , "preproc_ifdef" , "---" )\

View File

@@ -21,10 +21,12 @@ fn b32 os_vmem_decommit(void *p, usize size) {
fn void os_error_box(char *str) {
fprintf(stderr, "%s", str);
fflush(stderr);
}
fn void os_console_log(char *str) {
puts(str);
fputs(str, stdout);
fflush(stdout);
}
fn f64 os_parse_float(char *str) {

View File

@@ -20,11 +20,13 @@ fn b32 os_vmem_decommit(void *p, usize size) {
fn void os_error_box(char *str) {
MessageBoxA(NULL, str, "fatal error", MB_OK);
fprintf(stderr, "%s", str);
fflush(stderr);
}
fn void os_console_log(char *str) {
OutputDebugStringA(str);
fputs(str, stdout);
fflush(stdout);
}
fn f64 os_parse_float(char *str) {