lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/printer/SourceClausePrinter.java
protected void leaveFunctor(Functor functor)
    {
        String toAppend = indent;
        boolean addData = false;

        if (functor.isCompound())
        {
            toAppend += ")";
            addData = true;
        }

        if (!traverser.isInHead() && !traverser.isLastBodyFunctor() && traverser.isTopLevel())
        {
            toAppend += ",";
            addData = true;
        }

        if (traverser.isInHead() && traverser.isTopLevel())
        {
            toAppend += " :-";
            addData = true;
        }

        if (addData)
        {
            addLineToRow(toAppend);
            nextRow();
        }

        indent = indenter.generateTraceIndent(-indenter.getLastDelta());
    }
protected void leaveFunctor(Functor functor)
    {
        String toAppend = indent;
        boolean addData = false;

        if (functor.isCompound())
        {
            toAppend += ")";
            addData = true;
        }

        if (!traverser.isInHead() && !traverser.isLastBodyFunctor() && traverser.isTopLevel())
        {
            toAppend += ",";
            addData = true;
        }

        if (traverser.isInHead() && traverser.isTopLevel())
        {
            toAppend += " :-";
            addData = true;
        }

        if (addData)
        {
            addLineToRow(toAppend);
            nextRow();
        }

        indent = indenter.generateTraceIndent(-indenter.getLastDelta());
    }
{@inheritDoc}