Add some fflush() for avoid loosing comme characters
[TP_AL_C.git] / lexer / lexical_analyzer.c
index 905647e932e358ea510ad4d9c601bbb182f8fd68..7c85b4c4973dc8e12a530e3a4112991d3100d4c2 100644 (file)
@@ -200,15 +200,16 @@ FIN:
 
 error:
     if (tokenType == MOT || tokenType == MOTCLE) {
-        wpr_error(L"%s error with token type: %s and value: %ls\n",
+        fwprintf(stderr, L"%s error with token type: %s and value: %ls\n",
                   __func__,
                   tokenTypestr[tokenType],
                   token[tokenFound].value);
     } else {
-        wpr_error(L"%s error with token type: %s\n",
+        fwprintf(stderr, L"%s error with token type: %s\n",
                   __func__,
                   tokenTypestr[tokenType]);
     }
+    fflush(stderr);
     tokenType = FIN;
     exit(EXIT_FAILURE);
 }