serious scoping work unfinished.
This commit is contained in:
parent
bd8aa1c089
commit
07e43d3f5a
4
Tag.cpp
4
Tag.cpp
@ -145,7 +145,7 @@ namespace jet {
|
|||||||
__ifrow _ifrow(in, out, global, this);
|
__ifrow _ifrow(in, out, global, this);
|
||||||
continue;
|
continue;
|
||||||
} else if(ifTagName(in, "include")) {
|
} else if(ifTagName(in, "include")) {
|
||||||
__include _include(in, out, global, this);
|
__include _include(in, out, global, parent);
|
||||||
continue;
|
continue;
|
||||||
} else if(ifTagName(in, "jet")) {
|
} else if(ifTagName(in, "jet")) {
|
||||||
__jet _jet(in, out, global, this);
|
__jet _jet(in, out, global, this);
|
||||||
@ -157,7 +157,7 @@ namespace jet {
|
|||||||
__write _write(in, out, global, this);
|
__write _write(in, out, global, this);
|
||||||
continue;
|
continue;
|
||||||
} else if(ifTagName(in, "set")) {
|
} else if(ifTagName(in, "set")) {
|
||||||
__set _set(in, out, global, this);
|
__set _set(in, out, global, parent);
|
||||||
continue;
|
continue;
|
||||||
} else if(ifTagName(in, "call")) {
|
} else if(ifTagName(in, "call")) {
|
||||||
__call _call(in, out, global, this);
|
__call _call(in, out, global, this);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
namespace jet {
|
namespace jet {
|
||||||
|
|
||||||
__include::__include(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent) {
|
__include::__include(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent) {
|
||||||
|
resolveContainerParent = true;
|
||||||
if(!variableDefined("file"))
|
if(!variableDefined("file"))
|
||||||
throw coreutils::Exception("file keyword must be specified.");
|
throw coreutils::Exception("file keyword must be specified.");
|
||||||
if(hasContainer)
|
if(hasContainer)
|
||||||
|
@ -8,7 +8,6 @@ namespace jet {
|
|||||||
|
|
||||||
__set::__set(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent) {
|
__set::__set(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent) {
|
||||||
output = false;
|
output = false;
|
||||||
resolveContainerParent = true;
|
|
||||||
if(!variableDefined("name"))
|
if(!variableDefined("name"))
|
||||||
throw coreutils::Exception("set tag must have name defined.");
|
throw coreutils::Exception("set tag must have name defined.");
|
||||||
if(!variableDefined("expr") && variableDefined("value") && hasContainer)
|
if(!variableDefined("expr") && variableDefined("value") && hasContainer)
|
||||||
|
@ -1,2 +1,6 @@
|
|||||||
|
<set name="localvar" scope="local">This is a container set with '#[name1]'</set>
|
||||||
This is from an include tag.
|
This is from an include tag.
|
||||||
|
localname='#[name1]'
|
||||||
<set name="include" value="yes" />
|
<set name="include" value="yes" />
|
||||||
|
<set name="testinclude" value="x#[localvar]x" />
|
||||||
|
test='$[testinclude]'
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
<set name="newname" scope="global">another container value</set>
|
<set name="newname" scope="global">another container value</set>
|
||||||
<include file="./testinclude.jet" />
|
<include file="./testinclude.jet" />
|
||||||
include: $[include]
|
include: $[include]
|
||||||
|
localvar='#[localvar]'
|
||||||
>>>$[noeval]<<<
|
>>>$[noeval]<<<
|
||||||
>>>$[thename]<<<
|
>>>$[thename]<<<
|
||||||
<set name="iz" value="data" />
|
<set name="iz" value="data" />
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#!../jet-2.0
|
#!../jet-2.0
|
||||||
<jet cgi="true" name1="localname" filterblanklines="true" trimlines="true">
|
<jet cgi="true" name1="localname" filterblanklines="true" trimlines="true">
|
||||||
|
<set name="name2" value="localname2" scope="local" />
|
||||||
<set name="x" value="#[name1]" />
|
<set name="x" value="#[name1]" />
|
||||||
$[x] $[x]
|
localname=#[name1]
|
||||||
|
localname2=#[name2]
|
||||||
|
localname through x=$[x]
|
||||||
</jet>
|
</jet>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user