Add parser error hint when in doc mode about checking ## comment syntax.

This commit is contained in:
Jon Siwek 2011-04-21 13:34:37 -05:00
parent 4373565373
commit 17314fa144

View file

@ -1622,7 +1622,7 @@ opt_doc_list:
int yyerror(const char msg[])
{
char* msgbuf = new char[strlen(msg) + strlen(last_tok) + 64];
char* msgbuf = new char[strlen(msg) + strlen(last_tok) + 128];
if ( last_tok[0] == '\n' )
sprintf(msgbuf, "%s, on previous line", msg);
@ -1631,6 +1631,10 @@ int yyerror(const char msg[])
else
sprintf(msgbuf, "%s, at or near \"%s\"", msg, last_tok);
if ( generate_documentation )
strcat(msgbuf, "\nDocumentation mode is enabled: "
"remember to check syntax of ## style comments\n");
error(msgbuf);
return 0;