21 lines
648 B
C++
21 lines
648 B
C++
#include "__include.h"
|
|
#include "Exception.h"
|
|
#include "File.h"
|
|
|
|
namespace jet {
|
|
|
|
__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)
|
|
throw coreutils::Exception("include tag should not have a container.");
|
|
hasContainer = true;
|
|
resolveKeyword("file");
|
|
coreutils::File file(variables["file"]);
|
|
file.read();
|
|
container = file.asZString();
|
|
processContainer(container);
|
|
}
|
|
|
|
}
|