JetCore/__include.cpp
2024-10-22 09:16:59 -07:00

18 lines
507 B
C++

#include "__include.h"
#include "Exception.h"
#include "File.h"
namespace jet {
__include::__include(coreutils::ZString &in, coreutils::MString &out, Global &global) : Tag(in, out, global) {
if(!variableDefined("file"))
throw coreutils::Exception("file keyword must be specified.");
if(hasContainer)
throw coreutils::Exception("include tag should not have a container.");
coreutils::File file(file);
container = file.asZString();
processContainer(container);
}
}