![Logo](logo.png) |
User Guide
|
Go to the documentation of this file.
44 std::shared_ptr<ModToken>
token;
129 return std::static_pointer_cast<Pointer>(shared_from_this());
136 return std::static_pointer_cast<const Pointer>(shared_from_this());
165 PointerVarVector::const_iterator
erase_pointer_var(PointerVarVector::const_iterator first);
170 PointerVarVector::const_iterator
erase_pointer_var(PointerVarVector::const_iterator first, PointerVarVector::const_iterator last);
182 PointerVarVector::const_iterator
insert_pointer_var(PointerVarVector::const_iterator position,
const std::shared_ptr<PointerVar>& n);
187 template <
class NodeType,
class InputIterator>
188 void insert_pointer_var(PointerVarVector::const_iterator position, NodeType& to, InputIterator first, InputIterator last);
198 void reset_pointer_var(PointerVarVector::const_iterator position, std::shared_ptr<PointerVar> n);
291 template <
class NodeType,
class InputIterator>
294 for (
auto it = first; it != last; ++it) {
Abstract base class for all constant visitors implementation.
const ModToken * get_token() const noexcept override
Return associated token for the current ast node.
Pointer(const PointerVarVector &variables)
bool is_pointer() const noexcept override
Check if the ast node is an instance of ast::Pointer.
std::vector< std::shared_ptr< PointerVar > > PointerVarVector
const PointerVarVector & get_variables() const noexcept
Getter for member variable Pointer::variables.
PointerVarVector::const_iterator erase_pointer_var(PointerVarVector::const_iterator first)
Erase member to variables.
PointerVarVector variables
Vector of pointer variables.
void visit_children(visitor::Visitor &v) override
visit children i.e.
THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.
Abstract Syntax Tree (AST) related implementations.
std::shared_ptr< Ast > get_shared_ptr() override
Get std::shared_ptr from this pointer of the current ast node.
AstNodeType
Enum type for every AST node type.
std::string get_nmodl_name() const noexcept override
Return NMODL statement of ast node as std::string.
Auto generated AST classes declaration.
PointerVarVector::const_iterator insert_pointer_var(PointerVarVector::const_iterator position, const std::shared_ptr< PointerVar > &n)
Insert member to variables.
virtual ~Pointer()=default
Abstract base class for all visitors implementation.
Pointer * clone() const override
Return a copy of the current node.
std::shared_ptr< ModToken > token
token with location information
void set_token(const ModToken &tok)
Set token for the current ast node.
void emplace_back_pointer_var(PointerVar *n)
Add member to variables by raw pointer.
void set_parent_in_children()
Set this object as parent for all the children.
AstNodeType get_node_type() const noexcept override
Return type (ast::AstNodeType) of ast node.
@ POINTER
type of ast::Pointer
Represents POINTER statement in NMODL.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
std::string get_node_type_name() const noexcept override
Return type (ast::AstNodeType) of ast node as std::string.
std::shared_ptr< const Ast > get_shared_ptr() const override
Get std::shared_ptr from this pointer of the current ast node.
void set_variables(PointerVarVector &&variables)
Setter for member variable Pointer::variables (rvalue reference)
void reset_pointer_var(PointerVarVector::const_iterator position, PointerVar *n)
Reset member to variables.
Auto generated AST classes declaration.
Represent token returned by scanner.