Syntactic analyser implementation with HTML conversion code
[TP_AL_C.git] / lexer / print_helper.c
index 9f97a8fffe6f6acecd827d9382b5e8313ede6404..f7ab04ffb9887b2e2fbdf5d96ea06b6016ca509c 100644 (file)
@@ -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);
 }