Updated makefiles and better error reporting
This commit is contained in:
parent
5ed7952cc7
commit
58fc4ecc78
10 changed files with 94 additions and 74 deletions
|
|
@ -3,4 +3,12 @@ from_node \
|
|||
not_done_function \
|
||||
not_done_print \
|
||||
print_ast \
|
||||
print_ast/ast_print_command \
|
||||
print_ast/ast_print_global \
|
||||
print_ast/ast_print_node \
|
||||
print_ast/ast_print_redirection \
|
||||
print_ast/ast_print_subshell \
|
||||
print_ast/helper_function_print \
|
||||
print_ast/print_arithmetic \
|
||||
print_ast/print_ast \
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,10 @@
|
|||
|
||||
#include "../../include/function_declaration.h"
|
||||
|
||||
void ast_print_node_file_redirection_heredoc(t_ast_node self);
|
||||
void ast_print_node_file_redirection_heredoc(t_ast_node self)
|
||||
{
|
||||
(void)(self);
|
||||
}
|
||||
//{
|
||||
// if (self->data.file_redirection.op == AST_REDIR_HEREDOC)
|
||||
// printf("<<");
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ void ast_print_node(t_ast_node self)
|
|||
if (self->kind == AST_ELSE)
|
||||
return (ast_print_node_else(self));
|
||||
if (self->kind == AST_EMPTY)
|
||||
return (ast_print_node_empty(self));
|
||||
return ;
|
||||
if (self->kind == AST_EXPANSION)
|
||||
return (ast_print_node_expansion(self));
|
||||
if (self->kind == AST_EXTGLOB)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue