#include "__eval.h" #include "Exception.h" namespace jet { // is not a jet-2.0 addition - it's a genuine jet-1.4 tag that was // simply never implemented in 2.0 at all (no class, no dispatch entry // anywhere). SESSIONCTL.tag's own definition depends on it // throughout - capturing a tag's own invocation content into a named // variable (, often with // scope="parent" so a nested custom tag can write back into its // caller's scope: ...), and also // using it bare (no name=) to render an 'd file's content // inline (). Without this tag, // all of that content was silently falling through as undefined-tag // literal text, which is why a real, unmodified SESSIONCTL.tag // never produced its actual rendered body. // // content - same // capture semantics as content (Tag::storeVariable // already implements exactly this: interpret the container, then store // the result - raw if the container itself specified eval="no", already // evaluated otherwise - into variable X at the requested scope, // defaulting to global like does). Reused directly rather than // reimplemented, since it's the identical contract under a different // tag name. // // content (no name=) - content is interpreted and flows to // normal output, exactly like any ordinary container-having tag; no // special-casing needed since output/evaluate already default to true // on the base Tag class and the destructor's copyContainer(out, // parentOut) handles the rest once processContainer(container) below // has populated `out`. __eval::__eval(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) { if(keywordDefined("name")) { storeVariable(resolveKeyword("name")); output = false; } else if(hasContainer) { processContainer(container); } } }