mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
Add parser error hint when in doc mode about checking ## comment syntax.
This commit is contained in:
parent
4373565373
commit
17314fa144
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue