Do not return dropped tokens from Lexer.lex_token()
This commit is contained in:
parent
71ee7de9f9
commit
748c219625
@ -141,6 +141,18 @@ class <%= classname %>
|
||||
}
|
||||
|
||||
LexedToken lex_token()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
LexedToken lt = attempt_lex_token();
|
||||
if (lt.token != TOKEN_DROP)
|
||||
{
|
||||
return lt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private LexedToken attempt_lex_token()
|
||||
{
|
||||
LexedToken lt = LexedToken(m_input_row, m_input_col, TOKEN_NONE);
|
||||
struct LexedTokenState
|
||||
|
Loading…
x
Reference in New Issue
Block a user