![Logo](logo.png) |
User Guide
|
Go to the documentation of this file.
25 statements.reserve(nodes.size());
26 for (
auto& node: nodes) {
27 statements.push_back(std::dynamic_pointer_cast<ast::Statement>(node));
30 return std::make_shared<ast::StatementBlock>(std::move(statements));
35 return std::make_shared<ast::LongitudinalDiffusionBlock>(
36 std::make_shared<ast::Name>(std::make_shared<ast::String>(
"ld_" + node.
get_node_name())),
44 for (
const auto& ast_node: kinetic_blocks) {
45 auto kinetic_block = std::dynamic_pointer_cast<ast::KineticBlock>(ast_node);
static std::shared_ptr< ast::StatementBlock > make_statement_block(ast::KineticBlock &kinetic_block, nmodl::ast::AstNodeType node_type)
@ KINETIC_BLOCK
type of ast::KineticBlock
@ COMPARTMENT
type of ast::Compartment
std::vector< std::shared_ptr< Statement > > StatementVector
THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.
encapsulates code generation backend implementations
@ LON_DIFFUSE
type of ast::LonDiffuse
Auto generated AST classes declaration.
std::string get_node_name() const override
Return name of the node.
static std::shared_ptr< ast::LongitudinalDiffusionBlock > create_block(ast::KineticBlock &node)
AstNodeType
Enum type for every AST node type.
Auto generated AST classes declaration.
Auto generated AST classes declaration.
Utility functions for visitors implementation.
Auto generated AST classes declaration.
Auto generated AST classes declaration.
void visit_program(ast::Program &node) override
visit node of type ast::Program
Auto generated AST classes declaration.
std::vector< std::shared_ptr< const ast::Ast > > collect_nodes(const ast::Ast &node, const std::vector< ast::AstNodeType > &types)
traverse node recursively and collect nodes of given types
Auto generated AST classes declaration.
Represents top level AST node for whole NMODL input.
void emplace_back_node(Node *n)
Add member to blocks by raw pointer.