mojoshader_preprocessor.c
changeset 626 95d97e613112
parent 625 bfb4016d9404
child 627 166c4ad7126b
equal deleted inserted replaced
625:bfb4016d9404 626:95d97e613112
   551 
   551 
   552 
   552 
   553 static int require_newline(IncludeState *state)
   553 static int require_newline(IncludeState *state)
   554 {
   554 {
   555     const char *source = state->source;
   555     const char *source = state->source;
       
   556     const unsigned int linenum = state->line;
   556     const Token token = preprocessor_internal_lexer(state);
   557     const Token token = preprocessor_internal_lexer(state);
       
   558     state->source = source;  // rewind no matter what.
       
   559     state->line = linenum;
   557     if (token == TOKEN_INCOMPLETE_COMMENT)
   560     if (token == TOKEN_INCOMPLETE_COMMENT)
   558     {
   561         return 1; // call it an eol.
   559         state->source = source;  // pick this up later.
       
   560         return 1;  // call it an eol.
       
   561     } // if
       
   562     return ( (token == ((Token) '\n')) || (token == TOKEN_EOI) );
   562     return ( (token == ((Token) '\n')) || (token == TOKEN_EOI) );
   563 } // require_newline
   563 } // require_newline
   564 
   564 
   565 
   565 
   566 static void handle_pp_include(Context *ctx)
   566 static void handle_pp_include(Context *ctx)