X-Git-Url: https://git.piment-noir.org/?p=TP_AL_C.git;a=blobdiff_plain;f=lexer%2Fprint_helper.c;h=40d05232bb7004cc6e43f5624627440be7ebf6bd;hp=630985be4a8331b5f5147b21e084b03d10aab720;hb=15ad4b5ab7b62ce2e966730ccd1932877d658b66;hpb=e3e95680fb0e3c5882991b24f6dd5dbb1a59e87e diff --git a/lexer/print_helper.c b/lexer/print_helper.c index 630985b..40d0523 100644 --- a/lexer/print_helper.c +++ b/lexer/print_helper.c @@ -1,5 +1,6 @@ #include #include +#include #include "print_helper.h" #include "global_vars.h" @@ -61,3 +62,12 @@ void wprint_token(FILE* out_file) { } fflush(out_file); } + +void wprint_ctoken(FILE* out_file) { + if (tokenType == MOT || tokenType == MOTCLE) { + fwprintf(out_file, L"%20s: %ls\n", tokenTypestr[tokenType], tokenValue); + } else { + fwprintf(out_file, L"%20s\n", tokenTypestr[tokenType]); + } + fflush(out_file); +}