r1130 - trunk/varnish-cache/lib/libvcl

des at projects.linpro.no des at projects.linpro.no
Tue Sep 26 16:34:39 CEST 2006


Author: des
Date: 2006-09-26 16:34:39 +0200 (Tue, 26 Sep 2006)
New Revision: 1130

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_token.c
Log:
Add support for C++-style comments.

Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_token.c	2006-09-26 14:27:18 UTC (rev 1129)
+++ trunk/varnish-cache/lib/libvcl/vcc_token.c	2006-09-26 14:34:39 UTC (rev 1130)
@@ -313,6 +313,13 @@
 			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) {




More information about the varnish-commit mailing list