header tag upgraded to keyword resolution method.

This commit is contained in:
Brad Arant 2024-11-11 09:16:11 -08:00
parent 858d073d63
commit 7cab6916c7

View File

@ -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"];
}
} }
} }