Fixed bug on call tag scope check. Added keyword duplicate check to Tag processing.

This commit is contained in:
Brad Arant committed 2024-11-11 08:57:17 -08:00
1 parent 069fb9c9f3
commit 858d073d63
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -50,7 +50,10 @@ namespace jet {
if(!finished) {
coreutils::ZString keywordName = in.getTokenInclude("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_");
if(in.ifNext("=\"")) {
variables[keywordName] = in.getTokenExclude("\"");
if(variables.count(keywordName) == 0)
variables[keywordName] = in.getTokenExclude("\"");
else
throw coreutils::Exception("keyword name must be unique for tag.");
}
if(!in.ifNext("\"")) {}
}
+1 -1
View File
@@ -51,7 +51,7 @@ namespace jet {
close(fdo[1]);
if(variableDefined("name")) {
resolveKeyword("name");
if(!variableDefined("scope") && (variables["scope"] == "global"))
if(!variableDefined("scope") || (variables["scope"] == "global"))
global.variables[variables["name"]].read(fdo[0]);
else if(variables["scope"] == "local")
parent->variables[variables["name"]].read(fdo[0]);