aboutsummaryrefslogtreecommitdiff
path: root/node.h
blob: e59cb86958ba719380cdd7d4b2fa0b94f34a1a4f (plain)
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
31
32
33
34
#ifndef NODE_H
#define NODE_H
/*function/array info structs*/
struct fi {
	int argc;
	int *argv;
};

struct ai {
	int size;
	int start_idx;
};

/* Linked list */

typedef struct node_s {
	char *name;
	struct node_s *next;
	int var_type;

	struct fi* func_info;
	struct ai* array_info;
} node;

/*constructor*/
node* mknode(char *);

/* helpers */
node* list_search(node*, char *);
node* list_insert(node*, char*);

void free_list(node*);

#endif