parenthesis + syntax fixes

This commit is contained in:
gazhonsepaskwa
2025-02-15 11:40:14 +01:00
parent 656067ef42
commit 25ce220cf3
7 changed files with 29 additions and 13 deletions

View File

@@ -116,19 +116,31 @@ t_node *tokenize(char *str)
head = tokenize_base(str);
if (!head)
return (NULL);
debug_token_list(head, "tokenizer");
// debug_token_list(head, "tokenizer base");
if (!trim_nodes(head))
return (NULL);
debug_token_list(head, "tokenizer");
// debug_token_list(head, "trim");
if (!unstick_nodes(head))
return (NULL);
debug_token_list(head, "tokenizer");
// debug_token_list(head, "unstick");
stick_quote_node(head, 39);
stick_quote_node(head, '"');
debug_token_list(head, "tokenizer");
// debug_token_list(head, "stick_quote_node");
set_token(head);
// debug_token_list(head, "set token");
if (!trim_nodes(head))
return (NULL);
// debug_token_list(head, "trim2");
del_void_nodes(&head);
// debug_token_list(head, "del_void_nodes");
debug_token_list(head, "tokenizer");
if (syntax_error(head))
return (free_linked_list(head), NULL);
return (head);