![Logo](logo.png) |
User Guide
|
Go to the documentation of this file.
8 #include <catch2/catch_test_macros.hpp>
16 using namespace nmodl;
17 using namespace visitor;
18 using namespace test_utils;
30 SymtabVisitor().visit_program(*ast);
41 EXTERNAL gbl_foo, param_bar
53 std::vector<std::string> actual;
54 for (
const auto& var: info.external_variables) {
55 actual.push_back(var->get_name());
57 std::sort(actual.begin(), actual.end());
59 std::vector<std::string> expected{
"gbl_foo",
"param_bar"};
61 REQUIRE(actual == expected);
Class that binds all pieces together for parsing nmodl file.
encapsulates code generation backend implementations
Represent information collected from AST for code generation.
Helper visitor to gather AST information to help code generation.
AstNodeType
Enum type for every AST node type.
TEST_CASE("EXTERNAL variables")
Auto generated AST classes declaration.
nmodl::parser::UnitDriver driver
bool parse_string(const std::string &input)
parser Units provided as string (used for testing)
codegen::CodegenInfo analyze(const ast::Program &node)
run visitor and return information for code generation
CodegenInfo compute_code_info(const std::string &text)
Helper visitor to gather AST information to help code generation.
THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.