-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_tree.c
More file actions
30 lines (25 loc) · 915 Bytes
/
build_tree.c
File metadata and controls
30 lines (25 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
** EPITECH PROJECT, 2022
** codeTree
** File description:
** build_tree_nodes
*/
#include "my.h"
// Init a tree node and returns it using received data
tree_t *init_tree_node(char *str, int sep)
{
tree_t *tree = malloc(sizeof(tree_t));
// Init all tree variables with received arguments
return (tree);
}
// Build the whole tree according to the data contained in the string (tree->str)
void build_tree_nodes(tree_t *tree)
{
// STEP 1 Initialize parsing variable
// STEP 2 parse_str(parsing, tree->str);
// STEP 3 Init tree->left with the parsing left string as first parameter
// And as second parameter the operators found in the string get_operators().
// STEP 4 Init tree->right with the parsing right string as first parameter
// And as second parameter the operators found in the string get_operators().
// STEP 5 Then recursive for each node (left and right)
}