major scope work completed. Works well!!!
This commit is contained in:
parent
90d7d07e7e
commit
6d2da98024
51
Tag.cpp
51
Tag.cpp
@ -110,7 +110,7 @@ namespace jet {
|
||||
}
|
||||
|
||||
void Tag::resolveKeyword(coreutils::ZString keyword) {
|
||||
variables[keyword] = KeywordValue(variables[keyword], global, parent->variables);
|
||||
variables[keyword] = KeywordValue(variables[keyword], global, parent->local->variables);
|
||||
}
|
||||
|
||||
void Tag::processContainer(coreutils::ZString &container) {
|
||||
@ -124,70 +124,70 @@ namespace jet {
|
||||
while(!in.eod()) {
|
||||
if(in.startsWith("<")) {
|
||||
if(ifTagName(in, "mysql")) {
|
||||
__mysql _mysql(in, out, global, this);
|
||||
__mysql _mysql(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "comment")) {
|
||||
__comment _comment(in, out, global, this);
|
||||
__comment _comment(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "sql")) {
|
||||
__sql _sql(in, out, global, this);
|
||||
__sql _sql(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "whilerow")) {
|
||||
__whilerow _whilerow(in, out, global, this);
|
||||
__whilerow _whilerow(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "for")) {
|
||||
__for _for(in, out, global, this);
|
||||
__for _for(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "if")) {
|
||||
__if _if(in, out, global, this);
|
||||
__if _if(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "ifrow")) {
|
||||
__ifrow _ifrow(in, out, global, this);
|
||||
__ifrow _ifrow(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "include")) {
|
||||
__include _include(in, out, global, this);
|
||||
__include _include(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "jet")) {
|
||||
__jet _jet(in, out, global, this);
|
||||
__jet _jet(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "read")) {
|
||||
__read _read(in, out, global, this);
|
||||
__read _read(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "write")) {
|
||||
__write _write(in, out, global, this);
|
||||
__write _write(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "set")) {
|
||||
__set _set(in, out, global, this);
|
||||
__set _set(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "call")) {
|
||||
__call _call(in, out, global, this);
|
||||
__call _call(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "system")) {
|
||||
__system _system(in, out, global, this);
|
||||
__system _system(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "while")) {
|
||||
__while _while(in, out, global, this);
|
||||
__while _while(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "until")) {
|
||||
__until _until(in, out, global, this);
|
||||
__until _until(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "header")) {
|
||||
__header _header(in, out, global, this);
|
||||
__header _header(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "whiledir")) {
|
||||
__whiledir _whiledir(in, out, global, this);
|
||||
__whiledir _whiledir(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "stream")) {
|
||||
__stream _stream(in, out, global, this);
|
||||
__stream _stream(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "dump")) {
|
||||
__dump _dump(in, out, global, this);
|
||||
__dump _dump(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "tag")) {
|
||||
__tag _tag(in, out, global, this);
|
||||
__tag _tag(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagDefined(in, tag)) {
|
||||
__dotag _dotag(in, out, global, this);
|
||||
__dotag _dotag(in, out, global, this, local);
|
||||
continue;
|
||||
} else if(ifTagName(in, "container")) {
|
||||
while(!containerOut.eod())
|
||||
@ -202,10 +202,7 @@ namespace jet {
|
||||
}
|
||||
} else if(in.startsWith("$[") || in.startsWith("#[")) {
|
||||
global.errorCursor = in.getCursor();
|
||||
if(resolveContainerParent)
|
||||
out.write(global.getVariable(in, parent->variables));
|
||||
else
|
||||
out.write(global.getVariable(in, local->variables));
|
||||
out.write(global.getVariable(in, local->variables));
|
||||
} else {
|
||||
out.write(in.nextChar());
|
||||
}
|
||||
|
1
Tag.h
1
Tag.h
@ -41,7 +41,6 @@ namespace jet {
|
||||
bool filterBlankLines = false;
|
||||
bool trimLines = false;
|
||||
bool cleanWhitespace = false;
|
||||
bool resolveContainerParent = false;
|
||||
|
||||
private:
|
||||
bool containerOnly = false;
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__call::__call(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, parent) {
|
||||
__call::__call(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) {
|
||||
if(hasContainer)
|
||||
throw coreutils::Exception("call tag cannot have a container.");
|
||||
if(!variableDefined("pgm"))
|
||||
|
2
__call.h
2
__call.h
@ -8,7 +8,7 @@ namespace jet {
|
||||
class __call : public Tag {
|
||||
|
||||
public:
|
||||
__call(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__call(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
private:
|
||||
int pid;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__comment::__comment(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__comment::__comment(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
if(!hasContainer)
|
||||
throw coreutils::Exception("comment must have a container.");
|
||||
output = false;
|
||||
|
@ -8,7 +8,7 @@ namespace jet {
|
||||
class __comment : public Tag {
|
||||
|
||||
public:
|
||||
__comment(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__comment(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__dotag::__dotag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__dotag::__dotag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
if(hasContainer)
|
||||
parseContainer(container, containerOut);
|
||||
containerOut.reset();
|
||||
|
@ -9,7 +9,7 @@ namespace jet {
|
||||
class __dotag : public Tag {
|
||||
|
||||
public:
|
||||
__dotag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__dotag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__dump::__dump(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__dump::__dump(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) {
|
||||
if(!variableDefined("file"))
|
||||
throw coreutils::Exception("file must be sppecified for dump tag.");
|
||||
|
||||
@ -23,7 +23,7 @@ namespace jet {
|
||||
|
||||
outFile << "*** LOCAL VARIABLES ***" << std::endl;
|
||||
|
||||
for (auto i = parent->variables.begin(); i != parent->variables.end(); i++)
|
||||
for (auto i = local->variables.begin(); i != local->variables.end(); i++)
|
||||
outFile << i->first << "=[" << i->second << "]" << std::endl;
|
||||
|
||||
outFile.close();
|
||||
|
2
__dump.h
2
__dump.h
@ -10,7 +10,7 @@ namespace jet {
|
||||
class __dump : public Tag {
|
||||
|
||||
public:
|
||||
__dump(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__dump(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__for::__for(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__for::__for(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
double counter = 0.0f;
|
||||
bool nameDefined = variableDefined("name");
|
||||
if(variableDefined("start")) {
|
||||
|
2
__for.h
2
__for.h
@ -9,7 +9,7 @@ namespace jet {
|
||||
class __for : public Tag {
|
||||
|
||||
public:
|
||||
__for(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__for(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__header::__header(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, parent) {
|
||||
__header::__header(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) {
|
||||
output = false;
|
||||
if(!variableDefined("name"))
|
||||
throw coreutils::Exception("header tag must have name defined.");
|
||||
|
@ -11,7 +11,7 @@ namespace jet {
|
||||
class __header : public Tag {
|
||||
|
||||
public:
|
||||
__header(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__header(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
protected:
|
||||
|
||||
|
5
__if.cpp
5
__if.cpp
@ -5,11 +5,9 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__if::__if(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this, "else") {
|
||||
|
||||
__if::__if(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this, "else") {
|
||||
coreutils::MString result;
|
||||
bool booleanResult = false;
|
||||
|
||||
if(variableDefined("value1")) {
|
||||
resolveKeyword("value1");
|
||||
if(variableDefined("expr"))
|
||||
@ -42,7 +40,6 @@ namespace jet {
|
||||
processContainer(container);
|
||||
else if(hasContainer2)
|
||||
processContainer(container2);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
2
__if.h
2
__if.h
@ -11,7 +11,7 @@ namespace jet {
|
||||
class __if : public Tag {
|
||||
|
||||
public:
|
||||
__if(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__if(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__ifrow::__ifrow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this, "else") {
|
||||
__ifrow::__ifrow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this, "else") {
|
||||
output = false;
|
||||
if(!hasContainer)
|
||||
throw coreutils::Exception("ifrow tag must have a container.");
|
||||
|
@ -8,7 +8,7 @@ namespace jet {
|
||||
class __ifrow : public Tag {
|
||||
|
||||
public:
|
||||
__ifrow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__ifrow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__include::__include(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, parent) {
|
||||
__include::__include(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) {
|
||||
if(!variableDefined("file"))
|
||||
throw coreutils::Exception("file keyword must be specified.");
|
||||
if(hasContainer)
|
||||
|
@ -8,7 +8,7 @@ namespace jet {
|
||||
class __include : public Tag {
|
||||
|
||||
public:
|
||||
__include(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__include(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__jet::__jet(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__jet::__jet(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
if(variableDefined("cgi"))
|
||||
resolveKeyword("cgi");
|
||||
if(variables["cgi"] == "true") {
|
||||
|
2
__jet.h
2
__jet.h
@ -12,7 +12,7 @@ namespace jet {
|
||||
class __jet : public Tag {
|
||||
|
||||
public:
|
||||
__jet(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__jet(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__mysql::__mysql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__mysql::__mysql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
|
||||
if(!variableDefined("host"))
|
||||
throw coreutils::Exception("host must be specified for mysql tag.");
|
||||
|
@ -12,7 +12,7 @@ namespace jet {
|
||||
class __mysql : public Tag {
|
||||
|
||||
public:
|
||||
__mysql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__mysql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
~__mysql();
|
||||
|
||||
void query(coreutils::MString query);
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__read::__read(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__read::__read(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
if(!variableDefined("file"))
|
||||
throw coreutils::Exception("file keyword must be specified.");
|
||||
if(!variableDefined("name"))
|
||||
|
2
__read.h
2
__read.h
@ -8,7 +8,7 @@ namespace jet {
|
||||
class __read : public Tag {
|
||||
|
||||
public:
|
||||
__read(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__read(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
private:
|
||||
int fd;
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__set::__set(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, parent) {
|
||||
__set::__set(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) {
|
||||
output = false;
|
||||
if(!variableDefined("name"))
|
||||
throw coreutils::Exception("set tag must have name defined.");
|
||||
|
2
__set.h
2
__set.h
@ -11,7 +11,7 @@ namespace jet {
|
||||
class __set : public Tag {
|
||||
|
||||
public:
|
||||
__set(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__set(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__sql::__sql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, parent) {
|
||||
__sql::__sql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) {
|
||||
output = false;
|
||||
if(!hasContainer)
|
||||
throw coreutils::Exception("sql tag must have a container.");
|
||||
|
2
__sql.h
2
__sql.h
@ -8,7 +8,7 @@ namespace jet {
|
||||
class __sql : public Tag {
|
||||
|
||||
public:
|
||||
__sql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__sql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__stream::__stream(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__stream::__stream(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
if(!variableDefined("name"))
|
||||
throw coreutils::Exception("stream tag must have a file name to stream.");
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace jet {
|
||||
class __stream : public Tag {
|
||||
|
||||
public:
|
||||
__stream(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__stream(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__system::__system(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, parent) {
|
||||
__system::__system(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) {
|
||||
if(hasContainer)
|
||||
throw coreutils::Exception("system tag cannot have a container.");
|
||||
if(!variableDefined(coreutils::ZString("cmd")))
|
||||
|
@ -8,7 +8,7 @@ namespace jet {
|
||||
class __system : public Tag {
|
||||
|
||||
public:
|
||||
__system(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__system(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
private:
|
||||
int pid;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__tag::__tag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, this) {
|
||||
__tag::__tag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, this, this) {
|
||||
evaluate = false;
|
||||
output = false;
|
||||
if(!variableDefined("name"))
|
||||
|
2
__tag.h
2
__tag.h
@ -11,7 +11,7 @@ namespace jet {
|
||||
class __tag : public Tag {
|
||||
|
||||
public:
|
||||
__tag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__tag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
std::map<coreutils::MString, coreutils::MString> tags;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__until::__until(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__until::__until(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
|
||||
coreutils::MString result;
|
||||
bool booleanResult = false;
|
||||
|
@ -9,7 +9,7 @@ namespace jet {
|
||||
class __until : public Tag {
|
||||
|
||||
public:
|
||||
__until(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__until(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__while::__while(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__while::__while(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
|
||||
coreutils::MString result;
|
||||
bool booleanResult = false;
|
||||
|
@ -9,7 +9,7 @@ namespace jet {
|
||||
class __while : public Tag {
|
||||
|
||||
public:
|
||||
__while(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__while(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__whiledir::__whiledir(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__whiledir::__whiledir(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
|
||||
if(!variableDefined("path"))
|
||||
throw coreutils::Exception("whiledir tag must specify a path.");
|
||||
resolveKeyword("path");
|
||||
|
@ -10,7 +10,7 @@ namespace jet {
|
||||
class __whiledir : public Tag {
|
||||
|
||||
public:
|
||||
__whiledir(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__whiledir(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__whilerow::__whilerow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent) {
|
||||
__whilerow::__whilerow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) {
|
||||
|
||||
int count = variables["count"].asInteger();
|
||||
|
||||
|
@ -10,7 +10,7 @@ namespace jet {
|
||||
class __whilerow : public Tag {
|
||||
|
||||
public:
|
||||
__whilerow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__whilerow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
};
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
namespace jet {
|
||||
|
||||
__write::__write(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent, this) {
|
||||
__write::__write(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, local) {
|
||||
output = false;
|
||||
int mode = 0;
|
||||
int len;
|
||||
|
@ -11,7 +11,7 @@ namespace jet {
|
||||
class __write : public Tag {
|
||||
|
||||
public:
|
||||
__write(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent);
|
||||
__write(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -17,7 +17,7 @@ int main(int argc, char **argv, char **envp) {
|
||||
try {
|
||||
coreutils::MString out;
|
||||
global.errorCursor = data.getCursor();
|
||||
jet::__jet *jet = new jet::__jet(data, out, global, NULL);
|
||||
jet::__jet *jet = new jet::__jet(data, out, global, NULL, NULL);
|
||||
delete jet;
|
||||
global.outputHeaders();
|
||||
std::cout << out;
|
||||
|
@ -17,14 +17,15 @@ noeval=[this is the value store in #[name1].]
|
||||
nonexistant=[]
|
||||
numbers=[0123456789]
|
||||
subtraction=[2]
|
||||
testinclude=[]
|
||||
theexpr=[bcd]
|
||||
thename=[this is the value store in localname.]
|
||||
tohex=[tohex]
|
||||
varname1=[vardata]
|
||||
x=[]
|
||||
*** LOCAL VARIABLES ***
|
||||
file=[./testinclude.jet]
|
||||
localvar=[This is a container set with '']
|
||||
name1=[]
|
||||
testinclude=[xThis is a container set with ''x]
|
||||
cgi=[true]
|
||||
filterblanklines=[true]
|
||||
localvar=[This is a container set with 'localname']
|
||||
name1=[localname]
|
||||
testinclude=[xThis is a container set with 'localname'x]
|
||||
trimlines=[true]
|
||||
|
@ -3,5 +3,5 @@ This is from an include tag.
|
||||
localname='#[name1]'
|
||||
<set name="include" value="yes" />
|
||||
<set name="testinclude" value="x#[localvar]x" scope="local" />
|
||||
test='$[testinclude]'
|
||||
test='#[testinclude]'
|
||||
<dump file="./dump.txt" />
|
Loading…
x
Reference in New Issue
Block a user