async Task <ScopeStack> ISyntaxHighlighting.GetScopeStackAsync(int offset, CancellationToken cancellationToken)
        {
            var line = editor.GetLineByOffset(offset);

            foreach (var seg in (await((ISyntaxHighlighting)this).GetHighlightedLineAsync(line, cancellationToken).ConfigureAwait(false)).Segments)
            {
                if (seg.Contains(offset))
                {
                    return(seg.ScopeStack);
                }
            }
            return(await syntaxMode.GetScopeStackAsync(offset, cancellationToken).ConfigureAwait(false));
        }
        async Task <ScopeStack> ISyntaxHighlighting.GetScopeStackAsync(int offset, CancellationToken cancellationToken)
        {
            var line = editor.GetLineByOffset(offset);

            if (line == null)
            {
                throw new ArgumentOutOfRangeException(nameof(offset), "Offset out of range.");
            }
            foreach (var seg in (await((ISyntaxHighlighting)this).GetHighlightedLineAsync(line, cancellationToken).ConfigureAwait(false)).Segments)
            {
                if (seg.Contains(offset))
                {
                    return(seg.ScopeStack);
                }
            }
            return(await syntaxMode.GetScopeStackAsync(offset, cancellationToken).ConfigureAwait(false));
        }