Better debug token output.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 15 Feb 2009 02:46:08 -0500
changeset 629 d886403c6609
parent 628 33da6087aa48
child 630 e6bd53dd1f91
Better debug token output.
mojoshader_preprocessor.c
--- a/mojoshader_preprocessor.c	Sun Feb 15 02:25:26 2009 -0500
+++ b/mojoshader_preprocessor.c	Sun Feb 15 02:46:08 2009 -0500
@@ -105,6 +105,8 @@
     {
         if (token[i] == '\n')
             printf("\\n");
+        else if (token[i] == '\\')
+            printf("\\\\");
         else
             printf("%c", token[i]);
     } // for
@@ -157,6 +159,10 @@
             printf("'\\n'");
             break;
 
+        case ((Token) '\\'):
+            printf("'\\\\'");
+            break;
+
         default:
             assert(((int)tokenval) < 256);
             printf("'%c'", (char) tokenval);