#include <Puma/UnitTokenSrc.h>
Token unit iterator implementing the token source interface.
◆ UnitTokenSrc()
Puma::UnitTokenSrc::UnitTokenSrc |
( |
Unit & | unit | ) |
|
|
inline |
◆ current() [1/2]
Token * Puma::UnitTokenSrc::current |
( |
| ) |
const |
|
inline |
Get the current token in the unit.
- Returns
- A pointer to the current token.
◆ current() [2/2]
void Puma::UnitTokenSrc::current |
( |
Token * | token | ) |
|
|
inline |
Set the current token in the unit that is iterated.
- Parameters
-
token | The new current token. |
◆ hasNext()
bool Puma::UnitTokenSrc::hasNext |
( |
| ) |
const |
|
inline |
Check if the current token is not the last in the unit.
- Returns
- True, if the end of the unit isn't reached yet.
◆ next()
Token * Puma::UnitTokenSrc::next |
( |
| ) |
|
|
inlinevirtual |
Get the next token in the unit.
- Returns
- A pointer to the next token.
Implements Puma::TokenSource.
◆ unit()
Unit * Puma::UnitTokenSrc::unit |
( |
| ) |
const |
|
inline |
Get the token being iterated.
- Returns
- A pointer to the unit.