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