-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIdent.java
More file actions
43 lines (32 loc) · 878 Bytes
/
Copy pathIdent.java
File metadata and controls
43 lines (32 loc) · 878 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
/**
* An identifier is the way we save variables and const.
* Fuck this I'm not going to explain this, read the code.
*/
public class Ident{
public boolean var;
public String id;
private Type type;
private int value;
public Ident(){}
public Ident(boolean var, String id, Type type, int value){
this.var = var;
this.id = id;
this.type = type;
this.value = value;
}
public int getValue(){
return this.value;
}
public void setValue(int value){
this.value = value;
}
public Type getType(){
return this.type;
}
public String getId(){
return this.id;
}
public String toString(){
return this.var + " " + this.id + " " + this.type + " " + this.value;
}
}