Sarcasm.Unparsing.FormatterExtensions.IsNextStronger C# (CSharp) Method

IsNextStronger() private static method

private static IsNextStronger ( InsertedUtokens prevInsertedUtokens, InsertedUtokens nextInsertedUtokens, Unparser direction ) : bool
prevInsertedUtokens InsertedUtokens
nextInsertedUtokens InsertedUtokens
direction Unparser
return bool
        private static bool IsNextStronger(InsertedUtokens prevInsertedUtokens, InsertedUtokens nextInsertedUtokens, Unparser.Direction direction)
        {
            int compareResult = InsertedUtokens.Compare(prevInsertedUtokens, nextInsertedUtokens);

            if (compareResult == 0)
            {
                if (direction == Unparser.Direction.LeftToRight)
                    return prevInsertedUtokens.kind == InsertedUtokens.Kind.Right;
                else
                    return nextInsertedUtokens.kind != InsertedUtokens.Kind.Right;
            }
            else
                return compareResult < 0;
        }