![Logo](logo.png) |
User Guide
|
Go to the documentation of this file.
8 #include <catch2/catch_test_macros.hpp>
19 using namespace nmodl;
20 using namespace visitor;
22 using namespace test_utils;
35 SymtabVisitor().visit_program(*ast);
36 AfterCVodeToCnexpVisitor().visit_program(*ast);
39 CheckParentVisitor().check_ast(*ast);
45 SCENARIO(
"AfterCVodeToCnexpVisitor changes after_cvode solver method to cnexp") {
46 GIVEN(
"Breakpoint block with after_cvode method") {
47 std::string nmodl_text = R
"(
49 SOLVE states METHOD after_cvode
53 std::string output_nmodl = R"(
55 SOLVE states METHOD cnexp
59 THEN("AfterCVodeToCnexp visitor replaces after_cvode solver with cnexp") {
63 REQUIRE(result == expected_result);
Class that binds all pieces together for parsing nmodl file.
std::string to_nmodl(const ast::Ast &node, const std::set< ast::AstNodeType > &exclude_types)
Given AST node, return the NMODL string representation.
SCENARIO("AfterCVodeToCnexpVisitor changes after_cvode solver method to cnexp")
std::string reindent_text(const std::string &text, int indent_level)
Reindent nmodl text for text-to-text comparison.
encapsulates code generation backend implementations
Utility functions for visitors implementation.
Auto generated AST classes declaration.
nmodl::parser::UnitDriver driver
bool parse_string(const std::string &input)
parser Units provided as string (used for testing)
Visitor to change usage of after_cvode solver to cnexp.
Visitor for checking parents of ast nodes
std::string run_after_cvode_to_cnexp_visitor(const std::string &text)
THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.