X-Git-Url: https://git.piment-noir.org/?p=TP_AL_C.git;a=blobdiff_plain;f=lexer%2Fprint_helper.c;h=f7ab04ffb9887b2e2fbdf5d96ea06b6016ca509c;hp=9f97a8fffe6f6acecd827d9382b5e8313ede6404;hb=48e4b4adcc62229b0006ca4c35e54d63a9f6cc9e;hpb=6c47be3237ab266b1cba4e3051afaaaa55e07e52 diff --git a/lexer/print_helper.c b/lexer/print_helper.c index 9f97a8f..f7ab04f 100644 --- a/lexer/print_helper.c +++ b/lexer/print_helper.c @@ -53,11 +53,19 @@ void wpr_error(const wchar_t *format, ...) { fflush(stderr); } -void wprint_token() { +void wprint_token_stdout() { + if (tokenType == MOT || tokenType == MOTCLE) { + fwprintf(stdout, L"%20s: %ls\n", tokenTypestr[tokenType], token[tokenFound].value); + } else { + fwprintf(stdout, L"%20s\n", tokenTypestr[tokenType]); + } + fflush(stdout); +} + +void wprint_token_target() { if (tokenType == MOT || tokenType == MOTCLE) { fwprintf(target, L"%20s: %ls\n", tokenTypestr[tokenType], token[tokenFound].value); } else { fwprintf(target, L"%20s\n", tokenTypestr[tokenType]); } - fflush(target); }