![]() |
Spicy
|
#include <node.h>
Public Types | |
| using | iterator = RangeIterator< T > |
| using | const_iterator = RangeIterator< T > |
Public Member Functions | |
| Range (std::vector< Node >::const_iterator begin, std::vector< Node >::const_iterator end) | |
| Range (const std::vector< Node > &nodes) | |
| Range (const Range &other)=default | |
| Range (Range &&other)=default | |
| auto | begin () const |
| auto | end () const |
| size_t | size () const |
| const T & | front () const |
| bool | empty () const |
| std::vector< T > | copy () const |
| const T & | operator[] (size_t i) const |
| bool | operator== (const Range &other) const |
| Range & | operator= (const Range &other)=default |
| Range & | operator= (Range &&other)=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.
|
inline |
Returns a new vector containing copies of all nodes that the range includes.
1.8.13