15 if (filename.empty()) {
16 throw std::runtime_error(
"Empty filename for NMODLPrinter");
19 ofs.open(filename.c_str());
22 auto msg =
"Error while opening file '" + filename +
"' for NMODLPrinter";
23 throw std::runtime_error(msg);
void pop_level()
end of current block scope (i.e.
void add_indent()
print whitespaces for indentation
void add_element(const std::string &)
std::shared_ptr< std::ostream > result
void push_level()
start of new block scope (i.e.
encapsulates code generation backend implementations
Helper class for printing AST back to NMDOL test.
Implement string manipulation functions.