header tag upgraded to keyword resolution method.
This commit is contained in:
parent
858d073d63
commit
7cab6916c7
@ -17,6 +17,7 @@ namespace jet {
|
|||||||
throw coreutils::Exception("header tag cannot have both expr and value.");
|
throw coreutils::Exception("header tag cannot have both expr and value.");
|
||||||
if(!variableDefined("expr") && !variableDefined("value") && !hasContainer)
|
if(!variableDefined("expr") && !variableDefined("value") && !hasContainer)
|
||||||
throw coreutils::Exception("header tag must have a value, expr or a container.");
|
throw coreutils::Exception("header tag must have a value, expr or a container.");
|
||||||
|
resolveKeyword("name");
|
||||||
if(variableDefined("expr")) {
|
if(variableDefined("expr")) {
|
||||||
if(variableDefined("eval"))
|
if(variableDefined("eval"))
|
||||||
throw coreutils::Exception("Cannot use eval with expr.");
|
throw coreutils::Exception("Cannot use eval with expr.");
|
||||||
@ -28,8 +29,9 @@ namespace jet {
|
|||||||
} else {
|
} else {
|
||||||
global.headers[variables["name"]] = container;
|
global.headers[variables["name"]] = container;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
|
resolveKeyword("value");
|
||||||
global.headers[variables["name"]] = variables["value"];
|
global.headers[variables["name"]] = variables["value"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user