Concrete visitor for all AST classes.
Represents top level AST node for whole NMODL input.
Class that binds all pieces together for parsing C units.
Concrete visitor for all AST classes.
Visitor for Units blocks of AST.
void visit_factor_def(ast::FactorDef &node) override
Function to visit all the ast::FactorDef nodes and parse the units defined as ast::FactorDef in the U...
const parser::UnitDriver & get_unit_driver() const noexcept
Get the parser::UnitDriver to be able to use it outside the visitor::UnitsVisitor scope keeping the s...
parser::UnitDriver units_driver
Units Driver needed to parse the units file and the string produces by mod files' units.
UnitsVisitor(std::string t_units_content)
UnitsVisitor constructor that takes as argument the contents of the units file to parse the units fro...
UnitsVisitor()=default
Default UnitsVisitor constructor.
void visit_unit_def(ast::UnitDef &node) override
Function to visit all the ast::UnitDef nodes and parse the units defined as ast::UnitDef in the UNITS...
std::string units_content
Content of units lib file that defines all the basic units.
void visit_program(ast::Program &node) override
Override visit_program function to parse the contents of the nrnunits.lib unit file before starting v...
const std::string UNIT_FUZZ
Declaration of fuzz constant unit, which is the equivilant of 1 in mod files UNITS definitions.
void move(Item *q1, Item *q2, Item *q3)
encapsulates code generation backend implementations
static Node * node(Object *)
Utility functions for visitors implementation.