-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathInOutList.java
More file actions
43 lines (36 loc) · 810 Bytes
/
Copy pathInOutList.java
File metadata and controls
43 lines (36 loc) · 810 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
import java.util.List;
import java.util.LinkedList;
class InOutList extends Token {
private List<InOut> params;
public InOutList() {
params = new LinkedList<InOut>();
}
public InOutList prepend(InOut i) {
params.add(0,i);
return this;
}
public InOutList join(InOutList i) {
params.addAll(i.params);
return this;
}
public String toString(int t) {
String ret = "";
for (InOut s : params) {
ret += s.toString(0) + " " ;
}
return ret;
}
public String typeCheck() throws UTDLangException {
for (InOut i : params) {
String a = i.typeCheck();
}
return "";
}
public String getType() {
String fullType = ":";
for (InOut i : params) {
fullType = fullType + i.getType() + ":";
}
return fullType;
}
}