Fix the syntactic analyzer for real.
[TP_AL_C.git] / lexer / print_helper.c
index 630985be4a8331b5f5147b21e084b03d10aab720..40d05232bb7004cc6e43f5624627440be7ebf6bd 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <wchar.h>
+#include <stdarg.h>
 
 #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);
+}