public static Location GetLocationForKeyword([NotNull] this IOperation operation,
                                                     LookupKeywordStrategy lookupStrategy = LookupKeywordStrategy.PreferDoKeywordInDoWhileLoop)
        {
            if (operation.IsImplicit)
            {
                return(null);
            }

            var visitor = new OperationLocationVisitor(lookupStrategy);

            return(visitor.Visit(operation, null));
        }
        public static Location TryGetLocationForKeyword([NotNull] this IOperation operation,
                                                        DoWhileLoopLookupKeywordStrategy doWhileLoopLookupStrategy      = DoWhileLoopLookupKeywordStrategy.PreferDoKeyword,
                                                        TryFinallyLookupKeywordStrategy tryFinallyLookupKeywordStrategy = TryFinallyLookupKeywordStrategy.PreferTryKeyword)
        {
            if (operation.IsImplicit)
            {
                return(null);
            }

            var visitor = new OperationLocationVisitor(doWhileLoopLookupStrategy, tryFinallyLookupKeywordStrategy);

            return(visitor.Visit(operation, null));
        }
        public static Location GetLocationForKeyword([NotNull] this IOperation operation)
        {
            var visitor = new OperationLocationVisitor();

            return(visitor.Visit(operation, null));
        }