From: des Date: Tue, 26 Sep 2006 14:34:39 +0000 (+0000) Subject: Add support for C++-style comments. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cd693ab6186a2a8b8481efda5ff0f435ee2bbad;p=varnish Add support for C++-style comments. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1130 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvcl/vcc_token.c b/varnish-cache/lib/libvcl/vcc_token.c index 5cbf2957..e9fa9331 100644 --- a/varnish-cache/lib/libvcl/vcc_token.c +++ b/varnish-cache/lib/libvcl/vcc_token.c @@ -313,6 +313,13 @@ vcc_Lexer(struct tokenlist *tl, const char *b, const char *e) continue; } + /* Skip C++-style comments */ + if (*p == '/' && p[1] == '/') { + while (p < e && *p != '\n') + p++; + continue; + } + /* Match for the fixed tokens (see token.tcl) */ u = vcl_fixed_token(p, &q); if (u != 0) {