-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIdent.cpp
More file actions
62 lines (47 loc) · 846 Bytes
/
Ident.cpp
File metadata and controls
62 lines (47 loc) · 846 Bytes
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
#include "type_of_lex.hpp"
#include <cstring>
#include "Ident.hpp"
Ident::Ident(){
declare = false;
assign = false;
}
Ident::~Ident(){}
std::string Ident::get_name(){
return name;
}
void Ident::put_name(std::string name){
this->name = name;
}
bool Ident::get_declare(){
return declare;
}
void Ident::put_declare(){
declare = true;
}
type_of_lex Ident::get_type(){
return type;
}
void Ident::put_type(type_of_lex t){
type = t;
}
bool Ident::get_assign(){
return assign;
}
void Ident::put_assign(){
assign = true;
}
double Ident::get_value(){
return value;
}
void Ident::put_value(double v){
value = v;
}
void Ident::put_info(std::string info){
this->info = info;
}
std::string Ident::get_info(){
return info;
}
std::vector<int>& Ident::label_info(){
return labels_info;
}