aboutsummaryrefslogtreecommitdiff
path: root/node.h
blob: 8bafcc00e50c9ddcc9552ae4a1064366836fef1a (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
35
#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;
	int offset;

	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