This commit is contained in:
Nikita Ivanov 2022-06-13 11:20:51 +05:00
parent 00568ce0f6
commit 1d7f2cc63d
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

@ -249,13 +249,7 @@ static int commands(void)
static int parse(void)
{
#ifndef PARSE_DEBUG
next_token();
if (commands() == STAT_ERR)
return ERR;
#endif
#ifdef PARSE_DEBUG
#ifdef DEBUG_LEXER
while (1) {
next_token();
if (token.type == TOK_EOF)
@ -274,6 +268,11 @@ static int parse(void)
}
}
#endif
#ifndef DEBUG_LEXER
next_token();
if (commands() == STAT_ERR)
return ERR;
#endif
return OK;
}