34 line[*line_len] =
'\0';
62 bytes = read(fd, buf,
sizeof(buf) - 1);
69 bytes = read(fd, buf,
sizeof(buf) - 1);
73 line[line_len] =
'\0';
AST node creation and destruction prototypes.
void free_ast(t_ast *node)
Recursively free an entire AST tree.
int process_ui_input(char *input, t_shell *shell)
Full pipeline inside the UI.
void read_output_from_fd(t_ui *ui, int fd)
Read all available bytes from fd and split into output lines.
static void process_output_char(t_ui *ui, char c, char *line, int *line_len)
Process 1 output character from the child pipe into line buffers.
int executor(t_ast *node, t_shell *shell)
Main AST executor that dispatches by node type.
Executor prototypes for commands, pipes, redirections & heredocs.
int expand_all_tokens(t_token *tokens, t_shell *shell)
Expand all token values before parsing.
int collect_heredocs(t_ast *node, t_shell *shell)
Pre collect all heredocs in the AST before the execution phase.
UI mode structures, macros & function prototypes.
void out_add_line(t_out *out, const char *line)
Append a duplicate of a line to the output buffer.
t_ast * parse(t_token *tokens)
Parse a token list into an AST.
Parser entry point & sub parser prototypes.
Lexer token (singly linked list)
void free_token_list(t_token *head)
Free the entire token linked list.
Lexer, tokenizer, expander, and quote handling prototypes.
t_token * tokenize(char *input)
Tokenize the input string into a linked list of tokens.