@Override
public Var visit(ASTCollection node, Object data)
throws VisitorException
{
String listVarName = node.getVarName();
Var rootListVar = createAnonVar(listVarName);
Var listVar = rootListVar;
int childCount = node.jjtGetNumChildren();
for (int i = 0; i < childCount; i++) {
ValueExpr childValue = (ValueExpr)node.jjtGetChild(i).jjtAccept(this, null);
Var childVar = valueExpr2Var(childValue);
graphPattern.addRequiredSP(listVar, createConstVar(RDF.FIRST), childVar);
Var nextListVar;
if (i == childCount - 1) {
nextListVar = createConstVar(RDF.NIL);
}
else {
nextListVar = createAnonVar(listVarName + "-" + (i + 1));