-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalyze.h
33 lines (26 loc) · 924 Bytes
/
analyze.h
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
#ifndef _ANALYZE_H_
#define _ANALYZE_H_
/* Function buildSymtab constructs the symbol
* table by preorder traversal of the syntax tree
*/
#include "globals.h"
void buildSymtab(TreeNode *);
void typeCheck(TreeNode *);
int var_size_of(TreeNode *);
void insertNode(TreeNode * t, int scope_depth);
void insertParam(TreeNode * t,int scope_depth);
void deleteVar(TreeNode * t,int scope_depth);
void deleteVarOfField(TreeNode * tree, int scope);
void deleteParams(TreeNode * tree, int scope);
void appendSelfToParamAndSetStruct(TreeNode * function_node);
void stInsertVar(TreeNode *, int);
void gen_converted_type(TreeNode * tree);
bool isExp(TreeNode * t, ExpKind ekind);
bool isStmt(TreeNode * t, StmtKind skind);
char * setStructInfo(char *, int mode);
void setNestedFunction(int in_or_out);
bool inNestedFunction();
void setDirectStructEnv(bool in_or_not);
bool inDirectStructEnv();
extern int stack_offset ;
#endif