Skip to content
Permalink
Browse files
Set an error in the preprocessor if there's an incomplete multiline c…
…omment.
  • Loading branch information
icculus committed Feb 12, 2009
1 parent 6796643 commit d63b61a78473ff37699307d71f9bfc501de58e59
Showing with 6 additions and 0 deletions.
  1. +6 −0 mojoshader_preprocessor.c
@@ -350,6 +350,12 @@ static inline const char *_preprocessor_nexttoken(Preprocessor *_ctx,
continue; // pick up again after parent's #include line.
} // if

else if (token == TOKEN_PP_INCOMPLETE_COMMENT)
{
fail(ctx, "Incomplete multiline comment");
continue; // !!! FIXME: we should probably return TOKEN_ERROR or something.
} // else if

*_token = token;
*_len = (unsigned int) (state->source - state->token);
return state->token;

0 comments on commit d63b61a

Please sign in to comment.