44 std::shared_ptr<ModToken>
token;
129 return std::static_pointer_cast<Global>(shared_from_this());
136 return std::static_pointer_cast<const Global>(shared_from_this());
165 GlobalVarVector::const_iterator
erase_global_var(GlobalVarVector::const_iterator first);
170 GlobalVarVector::const_iterator
erase_global_var(GlobalVarVector::const_iterator first, GlobalVarVector::const_iterator last);
182 GlobalVarVector::const_iterator
insert_global_var(GlobalVarVector::const_iterator position,
const std::shared_ptr<GlobalVar>&
n);
187 template <
class NodeType,
class InputIterator>
188 void insert_global_var(GlobalVarVector::const_iterator position, NodeType& to, InputIterator first, InputIterator last);
198 void reset_global_var(GlobalVarVector::const_iterator position, std::shared_ptr<GlobalVar>
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 GLOBAL statement in NMODL.
const ModToken * get_token() const noexcept override
Return associated token for the current ast node.
bool is_global() const noexcept override
Check if the ast node is an instance of ast::Global.
std::string get_nmodl_name() const noexcept override
Return NMODL statement of ast node as std::string.
const GlobalVarVector & get_variables() const noexcept
Getter for member variable Global::variables.
std::shared_ptr< Ast > get_shared_ptr() override
Get std::shared_ptr from this pointer of the current ast node.
GlobalVarVector variables
Vector of global variables.
Global * clone() const override
Return a copy of the current node.
std::shared_ptr< const Ast > get_shared_ptr() const override
Get std::shared_ptr from this pointer of the current ast node.
virtual ~Global()=default
std::string get_node_type_name() const noexcept override
Return type (ast::AstNodeType) of ast node as std::string.
GlobalVarVector::const_iterator insert_global_var(GlobalVarVector::const_iterator position, const std::shared_ptr< GlobalVar > &n)
Insert member to variables.
void visit_children(visitor::Visitor &v) override
visit children i.e.
void emplace_back_global_var(GlobalVar *n)
Add member to variables by raw pointer.
void reset_global_var(GlobalVarVector::const_iterator position, GlobalVar *n)
Reset member to variables.
void set_variables(GlobalVarVector &&variables)
Setter for member variable Global::variables (rvalue reference)
Global(const GlobalVarVector &variables)
AstNodeType get_node_type() const noexcept override
Return type (ast::AstNodeType) of ast node.
void set_parent_in_children()
Set this object as parent for all the children.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
GlobalVarVector::const_iterator erase_global_var(GlobalVarVector::const_iterator first)
Erase member to variables.
std::shared_ptr< ModToken > token
token with location information
void set_token(const ModToken &tok)
Set token for the current ast node.
Abstract base class for all constant visitors implementation.
Abstract base class for all visitors implementation.
Auto generated AST classes declaration.
AstNodeType
Enum type for every AST node type.
@ GLOBAL
type of ast::Global
std::vector< std::shared_ptr< GlobalVar > > GlobalVarVector
Abstract Syntax Tree (AST) related implementations.
int const size_t const size_t n
Auto generated AST classes declaration.