3 #include "utils/logger.hpp"
15 const std::shared_ptr<ast::Expression>&
node)
const {
16 if (
node->is_name()) {
17 auto name = std::dynamic_pointer_cast<ast::Name>(
node);
19 return std::make_shared<ast::Integer>(
value,
nullptr);
26 node.visit_children(*
this);
39 node.visit_children(*
this);
Represents binary expression in the NMODL.
Represents specific element of an array variable.
void visit_indexed_name(ast::IndexedName &node) override
visit node of type ast::IndexedName
std::string index
index variable name
IndexRemover(std::string index, int value)
int value
integer value of index variable
std::shared_ptr< ast::Expression > replace_for_name(const std::shared_ptr< ast::Expression > &node) const
if expression we are visiting is Name then return new Integer node
bool under_indexed_name
true if we are visiting index variable
void visit_binary_expression(ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
void move(Item *q1, Item *q2, Item *q3)
encapsulates code generation backend implementations
static Node * node(Object *)
Utility functions for visitors implementation.