|
Yume
|
An iterator-like holding Tokens, used when parsing.
More...
#include <parser.hpp>
Public Member Functions | |
| TokenIterator (const VectorTokenIterator &iterator, const VectorTokenIterator &end) | |
| auto | at_end () const noexcept -> bool |
Check if the iterator is at the end and no more Tokens could possibly be read. More... | |
| auto | operator-> () const -> Token * |
| auto | operator* () const -> Token |
| auto | operator+ (int i) const noexcept -> TokenIterator |
| auto | operator- (int i) const noexcept -> TokenIterator |
| auto | operator++ () -> TokenIterator & |
| auto | operator++ (int) -> TokenIterator |
| auto | begin () const -> VectorTokenIterator |
| Returns the underlying iterator. This shouldn't really be needed but I'm too lazy to properly model an iterator. More... | |
| auto | end () const -> VectorTokenIterator |
An iterator-like holding Tokens, used when parsing.
Every parse method usually takes this as the first parameter. This is its own struct as it actually holds two iterators, where one is the end. This is to provide safe indexing (avoiding going past the end) without having to pass the end iterator around as a separate parameter.
Definition at line 31 of file parser.hpp.
|
inline |
Definition at line 36 of file parser.hpp.
|
inlinenoexcept |
Check if the iterator is at the end and no more Tokens could possibly be read.
Definition at line 40 of file parser.hpp.
Referenced by yume::ast::parser::Parser::consume(), yume::ast::parser::Parser::expect(), operator*(), operator++(), operator->(), and yume::ast::parser::Parser::require_separator().
|
inline |
Returns the underlying iterator. This shouldn't really be needed but I'm too lazy to properly model an iterator.
Definition at line 67 of file parser.hpp.
Referenced by yume::ast::parser::Parser::ast_ptr(), yume::ast::parser::Parser::make_ast(), yume::ast::parser::Parser::parse_operator(), and yume::ast::parser::Parser::ts().
|
inline |
Definition at line 69 of file parser.hpp.
Referenced by yume::ast::parser::Parser::clamped_iterator().
|
inline |
Definition at line 46 of file parser.hpp.
References at_end().
|
inlinenoexcept |
Definition at line 51 of file parser.hpp.
|
inline |
Definition at line 53 of file parser.hpp.
References at_end().
|
inline |
Definition at line 60 of file parser.hpp.
References at_end().
|
inlinenoexcept |
Definition at line 52 of file parser.hpp.
|
inline |
Definition at line 41 of file parser.hpp.
References at_end().