![]() |
Spicy
|
#include <node-range.h>
Public Types | |
| using | iterator = RangeIterator< T > |
| using | const_iterator = RangeIterator< T > |
| using | value_type = typename iterator::value_type |
Public Member Functions | |
| Range (typename NodeVector< T >::const_iterator begin, typename NodeVector< T >::const_iterator end) | |
| Range (const NodeVector< T > &nodes) | |
| Range (Nodes::const_iterator begin, Nodes::const_iterator end) | |
| Range (const Range &other)=default | |
| Range (Range &&other) noexcept=default | |
| auto | begin () const |
| auto | end () const |
| size_t | size () const |
| T * | front () const |
| bool | empty () const |
| operator NodeVector< T > () const | |
| T * | operator[] (size_t i) const |
| bool | operator== (const Range &other) const |
| Range & | operator= (const Range &other)=default |
| Range & | operator= (Range &&other) noexcept=default |
A range of AST nodes, defined by start and end into an existing vector of nodes. The range creates a view that can be iterated over, yielding a reference to each node in turn.