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) {
THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.
Represent token returned by scanner.
Represents POINTER statement in NMODL.
void set_token(const ModToken &tok)
Set token for the current ast node.
std::shared_ptr< const Ast > get_shared_ptr() const override
Get std::shared_ptr from this pointer of the current ast node.
bool is_pointer() const noexcept override
Check if the ast node is an instance of ast::Pointer.
virtual ~Pointer()=default
void set_parent_in_children()
Set this object as parent for all the children.
void visit_children(visitor::Visitor &v) override
visit children i.e.
void reset_pointer_var(PointerVarVector::const_iterator position, PointerVar *n)
Reset member to variables.
std::string get_node_type_name() const noexcept override
Return type (ast::AstNodeType) of ast node as std::string.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
void emplace_back_pointer_var(PointerVar *n)
Add member to variables by raw pointer.
const PointerVarVector & get_variables() const noexcept
Getter for member variable Pointer::variables.
Pointer(const PointerVarVector &variables)
void set_variables(PointerVarVector &&variables)
Setter for member variable Pointer::variables (rvalue reference)
PointerVarVector::const_iterator insert_pointer_var(PointerVarVector::const_iterator position, const std::shared_ptr< PointerVar > &n)
Insert member to variables.
std::string get_nmodl_name() const noexcept override
Return NMODL statement of ast node as std::string.
PointerVarVector variables
Vector of pointer variables.
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Ast > get_shared_ptr() override
Get std::shared_ptr from this pointer of the current ast node.
Pointer * clone() const override
Return a copy of the current node.
AstNodeType get_node_type() const noexcept override
Return type (ast::AstNodeType) of ast node.
PointerVarVector::const_iterator erase_pointer_var(PointerVarVector::const_iterator first)
Erase member to variables.
const ModToken * get_token() const noexcept override
Return associated token for the current ast node.
Abstract base class for all constant visitors implementation.
Abstract base class for all visitors implementation.
AstNodeType
Enum type for every AST node type.
@ POINTER
type of ast::Pointer
std::vector< std::shared_ptr< PointerVar > > PointerVarVector
Abstract Syntax Tree (AST) related implementations.
int const size_t const size_t n
Auto generated AST classes declaration.
Auto generated AST classes declaration.