fix(parser): making it compile -- UNSTABLE
This commit is contained in:
parent
1116eef083
commit
89ff5f4b1e
1 changed files with 3 additions and 3 deletions
|
|
@ -121,7 +121,7 @@ struct ast *parse_compound_list(void)
|
||||||
struct token *token = PEEK_TOKEN();
|
struct token *token = PEEK_TOKEN();
|
||||||
|
|
||||||
while (token->type != TOKEN_THEN || token->type != TOKEN_ELIF
|
while (token->type != TOKEN_THEN || token->type != TOKEN_ELIF
|
||||||
|| TOKEN_TYPE != TOKEN_ELSE)
|
|| token->type != TOKEN_ELSE)
|
||||||
{
|
{
|
||||||
// Parse simple command
|
// Parse simple command
|
||||||
if (token->type == TOKEN_SEMICOLON || token->type == TOKEN_NEWLINE)
|
if (token->type == TOKEN_SEMICOLON || token->type == TOKEN_NEWLINE)
|
||||||
|
|
@ -150,7 +150,7 @@ struct ast *parse_compound_list(void)
|
||||||
struct ast *parse_else_clause(void)
|
struct ast *parse_else_clause(void)
|
||||||
{
|
{
|
||||||
// Eventual elif content
|
// Eventual elif content
|
||||||
token = PEEK_TOKEN();
|
struct token *token = PEEK_TOKEN();
|
||||||
|
|
||||||
struct ast *result = NULL;
|
struct ast *result = NULL;
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ struct ast *parse_else_clause(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == NULL)
|
if (result == NULL)
|
||||||
result == ast_create_void();
|
result = ast_create_void();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue