mojoshader_preprocessor.c
changeset 634 b7fd8aa02bf4
parent 631 5045dcc9fdaf
child 635 be3b428802a1
equal deleted inserted replaced
631:5045dcc9fdaf 634:b7fd8aa02bf4
   569 
   569 
   570 
   570 
   571 static int require_newline(IncludeState *state)
   571 static int require_newline(IncludeState *state)
   572 {
   572 {
   573     const char *source = state->source;
   573     const char *source = state->source;
       
   574     const unsigned int bytes_left = state->bytes_left;
   574     const unsigned int linenum = state->line;
   575     const unsigned int linenum = state->line;
   575     const Token token = preprocessor_internal_lexer(state);
   576     const Token token = preprocessor_internal_lexer(state);
   576     state->source = source;  // rewind no matter what.
   577     state->source = source;  // rewind no matter what.
       
   578     state->bytes_left = bytes_left;
   577     state->line = linenum;
   579     state->line = linenum;
   578     if (token == TOKEN_INCOMPLETE_COMMENT)
   580     if (token == TOKEN_INCOMPLETE_COMMENT)
   579         return 1; // call it an eol.
   581         return 1; // call it an eol.
   580     return ( (token == ((Token) '\n')) || (token == TOKEN_EOI) );
   582     return ( (token == ((Token) '\n')) || (token == TOKEN_EOI) );
   581 } // require_newline
   583 } // require_newline