Updated makefiles and better error reporting
This commit is contained in:
parent
5ed7952cc7
commit
58fc4ecc78
10 changed files with 94 additions and 74 deletions
|
|
@ -56,34 +56,34 @@ void ast_print_node_program(t_ast_node self)
|
|||
}
|
||||
}
|
||||
|
||||
void ast_print_node_compound_statement(t_ast_node self)
|
||||
{
|
||||
t_usize i;
|
||||
// void ast_print_node_compound_statement(t_ast_node self)
|
||||
// {
|
||||
// t_usize i;
|
||||
|
||||
if (self == NULL)
|
||||
return ;
|
||||
if (self->kind != AST_COMPOUND_STATEMENT)
|
||||
return ;
|
||||
i = 0;
|
||||
if (self->data.compound_statement.bang)
|
||||
printf("! ");
|
||||
printf("{ ");
|
||||
while (i < self->data.compound_statement.body.len)
|
||||
{
|
||||
ast_print_node(self->data.compound_statement.body.buffer[i++]);
|
||||
printf(" ");
|
||||
}
|
||||
printf("}");
|
||||
i = 0;
|
||||
while (i < self->data.compound_statement.suffixes_redirections.len)
|
||||
{
|
||||
printf(" ");
|
||||
ast_print_node \
|
||||
(self->data.compound_statement.suffixes_redirections.buffer[i++]);
|
||||
}
|
||||
printf(" ");
|
||||
_print_term(self->data.compound_statement.term);
|
||||
}
|
||||
// if (self == NULL)
|
||||
// return ;
|
||||
// if (self->kind != AST_COMPOUND_STATEMENT)
|
||||
// return ;
|
||||
// i = 0;
|
||||
// if (self->data.compound_statement.bang)
|
||||
// printf("! ");
|
||||
// printf("{ ");
|
||||
// while (i < self->data.compound_statement.body.len)
|
||||
// {
|
||||
// ast_print_node(self->data.compound_statement.body.buffer[i++]);
|
||||
// printf(" ");
|
||||
// }
|
||||
// printf("}");
|
||||
// i = 0;
|
||||
// while (i < self->data.compound_statement.suffixes_redirections.len)
|
||||
// {
|
||||
// printf(" ");
|
||||
// ast_print_node \
|
||||
// (self->data.compound_statement.suffixes_redirections.buffer[i++]);
|
||||
// }
|
||||
// printf(" ");
|
||||
// _print_term(self->data.compound_statement.term);
|
||||
// }
|
||||
|
||||
void ast_print_node_compound_statement(t_ast_node self)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue