20 node.visit_children(*
this);
21 const auto& bin_exp = std::static_pointer_cast<ast::BinaryExpression>(
node.get_expression());
22 auto lhs = bin_exp->get_lhs();
23 auto rhs = bin_exp->get_rhs();
28 node.visit_children(*
this);
Auto generated AST classes declaration.
Represents differential equation in DERIVATIVE block.
Represents specific element of an array variable.
Represents top level AST node for whole NMODL input.
void visit_program(ast::Program &node) override
visit node of type ast::Program
void visit_indexed_name(ast::IndexedName &node) override
Get node name with index for the IndexedName node.
std::pair< std::string, std::unordered_set< std::string > > get_dependencies()
get the attribute dependencies
std::string get_indexed_name()
get the attribute indexed_name
void visit_diff_eq_expression(ast::DiffEqExpression &node) override
Get dependencies for the DiffEqExpression node.
std::pair< std::string, std::unordered_set< std::string > > dependencies
Get node name with indexed for the IndexedName node and the dependencies of DiffEqExpression node.
encapsulates code generation backend implementations
std::pair< std::string, std::unordered_set< std::string > > statement_dependencies(const std::shared_ptr< ast::Expression > &lhs, const std::shared_ptr< ast::Expression > &rhs)
If lhs and rhs combined represent an assignment (we assume to have an "=" in between them) we extract...
std::string get_indexed_name(const ast::IndexedName &node)
Given a Indexed node, return the name with index.
static Node * node(Object *)
Utility functions for visitors implementation.