mojoshader_preprocessor.c
changeset 1121 4142681f9fda
parent 1120 f655ea9c8ecd
child 1122 b333c15bb984
--- a/mojoshader_preprocessor.c	Thu Feb 14 00:15:14 2013 -0500
+++ b/mojoshader_preprocessor.c	Thu Feb 14 00:46:12 2013 -0500
@@ -180,6 +180,8 @@
         TOKENCASE(TOKEN_PP_PRAGMA);
         TOKENCASE(TOKEN_INCOMPLETE_COMMENT);
         TOKENCASE(TOKEN_BAD_CHARS);
+        TOKENCASE(TOKEN_SINGLE_COMMENT);
+        TOKENCASE(TOKEN_MULTI_COMMENT);
         TOKENCASE(TOKEN_EOI);
         TOKENCASE(TOKEN_PREPROCESSING_ERROR);
         #undef TOKENCASE
@@ -544,6 +546,10 @@
         } // if
     } // if
 
+    #if !MATCH_MICROSOFT_PREPROCESSOR
+    state->report_comments = 1;
+    #endif
+
     state->close_callback = close_callback;
     state->source_base = source;
     state->source = source;
@@ -2121,6 +2127,12 @@
                 continue;  // pushed the include_stack.
         } // else if
 
+        // you don't ever see these unless you enable state->report_comments.
+        else if ((token == TOKEN_SINGLE_COMMENT) || (token == TOKEN_MULTI_COMMENT))
+        {
+            print_debug_lexing_position(state);
+        } // else if
+
         else if (token == ((Token) '\n'))
         {
             print_debug_lexing_position(state);