Skip to content

Commit

Permalink
Set an error in the preprocessor if there's an incomplete multiline c…
Browse files Browse the repository at this point in the history
…omment.
  • Loading branch information
icculus committed Feb 12, 2009
1 parent 6796643 commit d63b61a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mojoshader_preprocessor.c
Expand Up @@ -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;
Expand Down

0 comments on commit d63b61a

Please sign in to comment.