-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathArity.java
65 lines (51 loc) · 1.5 KB
/
Arity.java
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
65
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
public class Arity {
public HashMap<Integer, String> parameters;
public Map<String, Symbol> arguments;
public Integer currentParameter;
public Integer currentArgument;
public Boolean hasRest;
public Integer destructors;
Boolean hasRecur;
ClojureParser.ArityContext arityCtx;
public Arity(){
parameters = new HashMap<>();
arguments = new LinkedHashMap<>();
currentParameter = 0;
currentArgument = 0;
hasRest = false;
destructors = 0;
hasRecur = false;
}
public Integer getParametersNumber(){ return parameters.size(); }
public Integer getCurrentArgument() {
return currentArgument;
}
public Integer getCurrentParameter() { return currentParameter; }
public Boolean getHasRest() {
return hasRest;
}
public void setHasRest(Boolean hasRest) {
this.hasRest = hasRest;
}
public Integer getDestructors() {
return destructors;
}
public void setDestructors(Integer destructors) {
this.destructors = destructors;
}
public Boolean getHasRecur() {
return hasRecur;
}
public void setHasRecur(Boolean hasRecur) {
this.hasRecur = hasRecur;
}
public ClojureParser.ArityContext getArityCtx() {
return arityCtx;
}
public void setArityCtx(ClojureParser.ArityContext arityCtx) {
this.arityCtx = arityCtx;
}
}