fixed local scoping on call tag.
This commit is contained in:
parent
9a9abab92d
commit
af7080e011
@ -36,7 +36,6 @@ namespace jet {
|
||||
coreutils::MString Global::processModifier(coreutils::MString &value, coreutils::MString &modifier) {
|
||||
if(modifier == "")
|
||||
return value;
|
||||
std::cout << "mod: " << modifier << std::endl;
|
||||
if(modifier == "tobinary")
|
||||
return value.toBinary();
|
||||
else if(modifier == "frombinary")
|
||||
|
@ -54,9 +54,9 @@ namespace jet {
|
||||
if(!variableDefined("scope") || (variables["scope"] == "global"))
|
||||
global.variables[variables["name"]].read(fdo[0]);
|
||||
else if(variables["scope"] == "local")
|
||||
local->variables[variables["name"]].read(fdo[0]);
|
||||
this->local->variables[variables["name"]].read(fdo[0]);
|
||||
else if(variables["scope"] == "parent")
|
||||
local->parent->local->variables[variables["name"]].read(fdo[0]);
|
||||
this->local->parent->local->variables[variables["name"]].read(fdo[0]);
|
||||
else
|
||||
throw coreutils::Exception("scope value is not valid.");
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
<jet cgi="true" name1="localname" filterblanklines="true" trimlines="true">
|
||||
<set name="iz" value="8" scope="local" />
|
||||
<for name="ix" start="1" end="10" step="1" scope="local" iz="#[iz]">
|
||||
#[scope]
|
||||
<dump file="dump.txt" />
|
||||
-->[iz]-[iy]-#[ix]<--
|
||||
-->#[ix]<--
|
||||
</for>
|
||||
</jet>
|
||||
|
@ -9,15 +9,14 @@ test1=[$[test1]]
|
||||
<set name="var1var" value="Yet another test" />
|
||||
<set name="var11" value="it seems to work." />
|
||||
name1=[#[name1]]
|
||||
$[$[ix]var$[ix];binary]
|
||||
$[$[ix]var$[ix];tobinary]
|
||||
$[var$[ix]]
|
||||
$[var$[ix]var]
|
||||
$[var$[i$[letterx]]var]
|
||||
$[letterx;TOHEX]
|
||||
$[letterx;tohex]
|
||||
$[var$[i$[letterx]]$[ix]]
|
||||
$[var$[i$[letterx]]$[i$[letterx]]]
|
||||
$[ix]
|
||||
<set name="ix" expr="$[ix]+1" />
|
||||
$[ix]
|
||||
#[iy]
|
||||
</jet>
|
||||
|
Loading…
x
Reference in New Issue
Block a user