-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscope.h
More file actions
55 lines (40 loc) · 1.04 KB
/
Copy pathscope.h
File metadata and controls
55 lines (40 loc) · 1.04 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* scope.h
* Ryan Mallon (2005)
*
*/
#ifndef _SCOPE_H_
#define _SCOPE_H_
#include "symtable.h"
/* Scope Information */
#ifndef _SCOPE_NODE_T_
#define _SCOPE_NODE_T_
typedef struct scope_node_s {
char *name;
int num_records;
int num_children;
int size;
int offset;
name_record_t **name_table;
struct scope_node_s *prev;
struct scope_node_s **children;
} scope_node_t;
#endif /* _SCOPE_NODE_T */
void print_scope_lists(void);
int num_decl_functions(void);
scope_node_t *enter_scope(void);
void exit_scope(void);
scope_node_t *new_func_scope(char *);
int add_scope(scope_node_t *);
scope_node_t *parse_function_scope(char *);
scope_node_t *enter_function_scope(char *);
scope_node_t *get_var_scope(name_record_t *);
scope_node_t *get_func_scope(char *);
scope_node_t *get_func_arg_scope(char *);
int get_scope_depth(void);
int global_index(name_record_t *);
int max_scope_size(scope_node_t *);
void set_scope_offsets(void);
void adjust_scope_offsets(scope_node_t *, int);
void print_xml_scope_list(char *);
#endif /* _SCOPE_H_ */