![]() |
User Guide
|
#include "visitors/constant_folder_visitor.hpp"
#include "ast/all.hpp"
#include "utils/logger.hpp"
#include "visitors/visitor_utils.hpp"
Go to the source code of this file.
Namespaces | |
nmodl | |
encapsulates code generation backend implementations | |
nmodl::visitor | |
Implementation of different AST visitors. | |
Functions | |
static bool | nmodl::visitor::is_number (const std::shared_ptr< ast::Expression > &node) |
check if given expression is a number note that the DEFINE node is already expanded to integer More... | |
static double | nmodl::visitor::get_value (const std::shared_ptr< ast::Expression > &node) |
get value of a number node TODO : eval method can be added to virtual base class More... | |
static bool | nmodl::visitor::supported_operator (ast::BinaryOp op) |
operators that currently implemented More... | |
static double | nmodl::visitor::compute (double lhs, ast::BinaryOp op, double rhs) |
Evaluate binary operation TODO : add support for other binary operators like ^ (pow) More... | |