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