Added scope="parent" to set tag.
This commit is contained in:
1 parent
489f1d6915
commit
169ad1aa11
2 files changed
+9
-1
No files matched your search
@@ -25,6 +25,8 @@ namespace jet {
|
||||
global.variables[variables["name"]] = Operand(variables["expr"]).string;
|
||||
else if(variables["scope"] == "local")
|
||||
parent->variables[variables["name"]] = Operand(variables["expr"]).string;
|
||||
else if(variables["scope"] == "parent")
|
||||
parent->parent->variables[variables["name"]] = Operand(variables["expr"]).string;
|
||||
} else if(hasContainer) {
|
||||
processContainer(container);
|
||||
if(evaluate) {
|
||||
@@ -32,17 +34,23 @@ namespace jet {
|
||||
global.variables[variables["name"]] = out;
|
||||
else if(variables["scope"] == "local")
|
||||
parent->variables[variables["name"]] = out;
|
||||
else if(variables["scope"] == "parent")
|
||||
parent->parent->variables[variables["name"]] = out;
|
||||
} else {
|
||||
if(!variableDefined("scope") || (variables["scope"] == "global"))
|
||||
global.variables[variables["name"]] = container;
|
||||
else if(variables["scope"] == "local")
|
||||
parent->variables[variables["name"]] = container;
|
||||
else if(variables["scope"] == "parent")
|
||||
parent->parent->variables[variables["name"]] = container;
|
||||
}
|
||||
} else {
|
||||
if(!variableDefined("scope") || (variables["scope"] == "global"))
|
||||
global.variables[variables["name"]] = variables["value"];
|
||||
else if(variables["scope"] == "local")
|
||||
parent->variables[variables["name"]] = variables["value"];
|
||||
else if(variables["scope"] == "parent")
|
||||
parent->parent->variables[variables["name"]] = variables["value"];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user