30 token = ft_calloc(
sizeof(
t_token), 1);
34 token->
value = ft_strdup(value);
97 current = current->
next;
98 current->
next = new_token;
t_token_type
Token types produced by Lexer.
Lexer token (singly linked list)
char * value
Text content (allocated)
t_token_type type
Token type (word, pipe, redir)
struct s_token * next
Next token.
t_quote_type quote_type
Quote context.
int connected
1 if connected
void free_token_list(t_token *head)
Free the entire token linked list.
void add_token(t_token **head, t_token *new_token)
Add a token to the end of a linked list.
void free_token(t_token *token)
Free a single token and its value str.
t_token * create_token(t_token_type type, char *value)
Allocate and initialize a new token.
Lexer, tokenizer, expander, and quote handling prototypes.