struct string_lexer slex;
string_lexer_init (&slex, s.string, s.length, SEG_MODE_INTERACTIVE, true);
struct token another_token = { .type = T_STOP };
- if (!string_lexer_next (&slex, token)
- || string_lexer_next (&slex, &another_token))
+ if (string_lexer_next (&slex, token) != SLR_TOKEN
+ || string_lexer_next (&slex, &another_token) != SLR_END)
{
token_uninit (token);
token_uninit (&another_token);