@Override
    public Object visitTraversalTerminalMethod_toList(final GremlinParser.TraversalTerminalMethod_toListContext ctx) {
        return traversal.toList();
    }
{@inheritDoc}

Traversal terminal method to list step
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalTerminalMethodVisitor.java