61 void must_be (e_token tok); |
61 void must_be (e_token tok); |
62 bool peek_next (token* tk = null); |
62 bool peek_next (token* tk = null); |
63 |
63 |
64 inline bool has_valid_token() const |
64 inline bool has_valid_token() const |
65 { |
65 { |
66 return (is_at_end() == false && m_token_position != m_tokens.begin() - 1); |
66 return (m_token_position < m_tokens.end() && m_token_position >= m_tokens.begin()); |
67 } |
67 } |
68 |
68 |
69 inline token* get_token() const |
69 inline token* get_token() const |
70 { |
70 { |
71 assert (has_valid_token() == true); |
71 assert (has_valid_token() == true); |