-
Notifications
You must be signed in to change notification settings - Fork 2
/
SymbolInfo.cpp
64 lines (50 loc) · 1.48 KB
/
SymbolInfo.cpp
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
56
57
58
59
60
61
62
63
64
#include "SymbolInfo.h"
SymbolInfo::SymbolInfo(){
isFunctionDeclaration = false;
isFunction = false;
var_type = "";
stk_offset = "";
}
SymbolInfo::SymbolInfo(string key,string val)
{
this->key = key;
this->val = val;
this->nxt = NULL;
bucket = -1;
bucket_pos = 0;
ara_size = 0;
var_type = "";
stk_offset = "";
}
SymbolInfo::SymbolInfo(string key,string val,string var_type,string stk_offset,int ara_size,vector<string>param_v,bool isFunctionDeclaration,bool isFunction)
{
this->key = key;
this->val = val;
this->var_type = var_type;
this->stk_offset = stk_offset;
this->ara_size = ara_size;
this->param_v = param_v;
this->isFunctionDeclaration = isFunctionDeclaration;
this->isFunction = isFunction;
this->nxt = NULL;
bucket = -1;
bucket_pos = 0;
}
/////////////////////////////////////////////////////////
SymbolInfo::SymbolInfo(string key,string val,string var_type,string stk_offset,int ara_size,vector<string>param_v,bool isFunctionDeclaration,bool isFunction,SymbolInfo* nxt)
{
this->key = key;
this->val = val;
this->var_type = var_type;
this->stk_offset = stk_offset;
this->ara_size = ara_size;
this->param_v = param_v;
this->isFunctionDeclaration = isFunctionDeclaration;
this->isFunction = isFunction;
this->nxt = nxt;
this->bucket = bucket;
this->bucket_pos = bucket_pos;
}
void SymbolInfo::setVarType(string var_type){
this->var_type = var_type;
}