diff --git a/Tag.cpp b/Tag.cpp index 316e781..600b274 100644 --- a/Tag.cpp +++ b/Tag.cpp @@ -145,7 +145,7 @@ namespace jet { __ifrow _ifrow(in, out, global, this); continue; } else if(ifTagName(in, "include")) { - __include _include(in, out, global, this); + __include _include(in, out, global, parent); continue; } else if(ifTagName(in, "jet")) { __jet _jet(in, out, global, this); @@ -157,7 +157,7 @@ namespace jet { __write _write(in, out, global, this); continue; } else if(ifTagName(in, "set")) { - __set _set(in, out, global, this); + __set _set(in, out, global, parent); continue; } else if(ifTagName(in, "call")) { __call _call(in, out, global, this); diff --git a/__include.cpp b/__include.cpp index 234bb61..1eb1302 100644 --- a/__include.cpp +++ b/__include.cpp @@ -5,6 +5,7 @@ namespace jet { __include::__include(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent) { + resolveContainerParent = true; if(!variableDefined("file")) throw coreutils::Exception("file keyword must be specified."); if(hasContainer) diff --git a/__set.cpp b/__set.cpp index 78cbea1..c7e2114 100644 --- a/__set.cpp +++ b/__set.cpp @@ -8,7 +8,6 @@ namespace jet { __set::__set(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent) { output = false; - resolveContainerParent = true; if(!variableDefined("name")) throw coreutils::Exception("set tag must have name defined."); if(!variableDefined("expr") && variableDefined("value") && hasContainer) diff --git a/tests/testinclude.jet b/tests/testinclude.jet index c1a12cc..c4f8a09 100644 --- a/tests/testinclude.jet +++ b/tests/testinclude.jet @@ -1,2 +1,6 @@ +This is a container set with '#[name1]' This is from an include tag. +localname='#[name1]' + +test='$[testinclude]' diff --git a/tests/testjet.jet b/tests/testjet.jet index e16fcdd..7cdd5a6 100755 --- a/tests/testjet.jet +++ b/tests/testjet.jet @@ -39,6 +39,7 @@ another container value include: $[include] + localvar='#[localvar]' >>>$[noeval]<<< >>>$[thename]<<< diff --git a/tests/testscope.jet b/tests/testscope.jet index 3dcf55b..ffc6a51 100755 --- a/tests/testscope.jet +++ b/tests/testscope.jet @@ -1,5 +1,8 @@ #!../jet-2.0 + - $[x] $[x] + localname=#[name1] + localname2=#[name2] + localname through x=$[x]