| 783 | } |
| 784 | |
| 785 | const Token *TokenIterator::match(token_type_t tokenType, const char *failure_msg) |
| 786 | { |
| 787 | const Token *result = get(); |
| 788 | if (result->get_type() != tokenType) |
| 789 | { |
| 790 | throw TemplateException(failure_msg ? failure_msg : "unexpected token"); |
| 791 | } |
| 792 | next(); |
| 793 | return result; |
| 794 | } |
| 795 | |
| 796 | TokenIterator &TokenIterator::operator++() |
| 797 | { |