Commit e90f5d70 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Lasse Karstensen

Save the VCL syntax version, we will need it later on.

parent 11c00080
......@@ -172,6 +172,7 @@ struct vcp {
struct vcc {
unsigned magic;
#define VCC_MAGIC 0x24ad719d
float syntax;
/* Parameter/Template section */
const struct vcp *param;
......
......@@ -291,17 +291,17 @@ vcc_ParseDirector(struct vcc *tl)
static void
vcc_ParseVcl(struct vcc *tl)
{
double ver;
struct token *tok;
assert(vcc_IdIs(tl->t, "vcl"));
vcc_NextToken(tl);
tok = tl->t;
ver = vcc_DoubleVal(tl);
tl->syntax = vcc_DoubleVal(tl);
ERRCHK(tl);
if (ver != 4.0) {
if (tl->syntax != 4.0) {
// see TODO above
VSB_printf(tl->sb, "VCL version %.1f not supported.\n", ver);
VSB_printf(tl->sb, "VCL version %.1f not supported.\n",
tl->syntax);
vcc_ErrWhere(tl, tok);
ERRCHK(tl);
}
......
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