--- a/src/lexer.h Fri Jan 17 22:57:40 2014 +0200 +++ b/src/lexer.h Sat Jan 18 02:11:45 2014 +0200 @@ -63,7 +63,7 @@ inline bool has_valid_token() const { - return (is_at_end() == false && m_token_position != m_tokens.begin() - 1); + return (m_token_position < m_tokens.end() && m_token_position >= m_tokens.begin()); } inline token* get_token() const