diff --git a/src/codegen/codegen_coreneuron_cpp_visitor.cpp b/src/codegen/codegen_coreneuron_cpp_visitor.cpp index dfe26b1c1..374b48884 100644 --- a/src/codegen/codegen_coreneuron_cpp_visitor.cpp +++ b/src/codegen/codegen_coreneuron_cpp_visitor.cpp @@ -346,28 +346,6 @@ void CodegenCoreneuronCppVisitor::print_abort_routine() const { /****************************************************************************************/ -void CodegenCoreneuronCppVisitor::print_top_verbatim_blocks() { - if (info.top_verbatim_blocks.empty()) { - return; - } - print_namespace_stop(); - - printer->add_newline(2); - print_using_namespace(); - - printing_top_verbatim_blocks = true; - - for (const auto& block: info.top_verbatim_blocks) { - printer->add_newline(2); - block->accept(*this); - } - - printing_top_verbatim_blocks = false; - - print_namespace_start(); -} - - void CodegenCoreneuronCppVisitor::print_function_prototypes() { if (info.functions.empty() && info.procedures.empty()) { return; diff --git a/src/codegen/codegen_coreneuron_cpp_visitor.hpp b/src/codegen/codegen_coreneuron_cpp_visitor.hpp index dc67cca21..2326dac1d 100644 --- a/src/codegen/codegen_coreneuron_cpp_visitor.hpp +++ b/src/codegen/codegen_coreneuron_cpp_visitor.hpp @@ -325,12 +325,6 @@ class CodegenCoreneuronCppVisitor: public CodegenCppVisitor { /****************************************************************************************/ - /** - * Print top level (global scope) verbatim blocks - */ - void print_top_verbatim_blocks(); - - /** * Print function and procedures prototype declaration */ diff --git a/src/codegen/codegen_cpp_visitor.cpp b/src/codegen/codegen_cpp_visitor.cpp index 7c824b67f..113cac77b 100644 --- a/src/codegen/codegen_cpp_visitor.cpp +++ b/src/codegen/codegen_cpp_visitor.cpp @@ -640,6 +640,28 @@ void CodegenCppVisitor::print_namespace_stop() { } +void CodegenCppVisitor::print_top_verbatim_blocks() { + if (info.top_verbatim_blocks.empty()) { + return; + } + print_namespace_stop(); + + printer->add_newline(2); + print_using_namespace(); + + printing_top_verbatim_blocks = true; + + for (const auto& block: info.top_verbatim_blocks) { + printer->add_newline(2); + block->accept(*this); + } + + printing_top_verbatim_blocks = false; + + print_namespace_start(); +} + + /****************************************************************************************/ /* Printing routines for code generation */ /****************************************************************************************/ diff --git a/src/codegen/codegen_cpp_visitor.hpp b/src/codegen/codegen_cpp_visitor.hpp index 986dedbff..6c368911a 100644 --- a/src/codegen/codegen_cpp_visitor.hpp +++ b/src/codegen/codegen_cpp_visitor.hpp @@ -1455,6 +1455,11 @@ class CodegenCppVisitor: public visitor::ConstAstVisitor { */ void print_nmodl_constants(); + /** + * Print top level (global scope) verbatim blocks + */ + void print_top_verbatim_blocks(); + /****************************************************************************************/ /* Overloaded visitor routines */