Commit a3a69a3c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make it an error for a /*...*/ comment to contain /*

Fixes #655



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4627 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent e2de855f
......@@ -355,6 +355,15 @@ vcc_Lexer(struct tokenlist *tl, struct source *sp)
/* Skip C-style comments */
if (*p == '/' && p[1] == '*') {
for (q = p + 2; q < sp->e; q++) {
if (*q == '/' && q[1] == '*') {
vsb_printf(tl->sb,
"/* ... */ comment contains /*\n");
vcc_AddToken(tl, EOI, p, p + 2);
vcc_ErrWhere(tl, tl->t);
vcc_AddToken(tl, EOI, q, q + 2);
vcc_ErrWhere(tl, tl->t);
return;
}
if (*q == '*' && q[1] == '/') {
p = q + 2;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment