private boolean inTopLevelFunctor(PositionalContext context)
    {
        PositionalContext parentContext = context.getParentContext();

        return parentContext.isTopLevel() || isTopLevel(parentContext);
    }
private boolean inTopLevelFunctor ( PositionalContext context ) { PositionalContext parentContext = context . getParentContext ( ) ; return parentContext . isTopLevel ( ) || isTopLevel ( parentContext ) ; }
Checks if the current position is immediately within a top-level functor.

@param  context The position context to examine.

@return <tt>true</tt> iff the current position is immediately within a top-level functor.