]> err.no Git - varnish/commitdiff
Add support for C++-style comments.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 26 Sep 2006 14:34:39 +0000 (14:34 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 26 Sep 2006 14:34:39 +0000 (14:34 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1130 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvcl/vcc_token.c

index 5cbf29573835e52feb8b03270da0c836e2649139..e9fa933102543247a8c4443ba2fb3682ca5e3242 100644 (file)
@@ -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) {