ASPParameterlist erzeugt auch paramNum

This commit is contained in:
JanUlrich 2018-01-06 09:38:53 +01:00
parent 6ddc4983b0
commit 3c732346d9
2 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,11 @@
<artifactId>antlr4</artifactId>
<version>4.7</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>

View File

@ -11,11 +11,13 @@ import java.util.Set;
public class ASPParameterList {
private final static String ASP_PARAMLIST_NAME = "param";
private final static String ASP_PARAMLISTNUMERATION_NAME = "paramNum";
private final static String ASP_PARAMLIST_END_POINTER = "null";
public final String name;
private final List<ASPType> types;
public ASPParameterList(List<ASPType> types, ASPWriter writer){
int paramNum = 0;
this.types = types;
if(types.size() == 0){
name = ASP_PARAMLIST_END_POINTER;
@ -30,6 +32,8 @@ public class ASPParameterList {
if(! it.hasNext())nextPointer = ASP_PARAMLIST_END_POINTER;
param += nextPointer;
writer.add(new ASPStatement(ASP_PARAMLIST_NAME + "(" + param + ")"));
writer.add(new ASPStatement(ASP_PARAMLISTNUMERATION_NAME + "(" + name + "," +t + "," + paramNum + ")"));
paramNum++;
//paramDefinitions.add(new ASPStatement(ASP_PARAMLIST_NAME + "(" + param + ")"));
}
}