ScanSpans() public static method

public static ScanSpans ( TextDocument doc, Mono.TextEditor.Highlighting.SyntaxMode mode, Mono.TextEditor.Highlighting.Rule rule, CloneableStack spanStack, int start, int end ) : void
doc TextDocument
mode Mono.TextEditor.Highlighting.SyntaxMode
rule Mono.TextEditor.Highlighting.Rule
spanStack CloneableStack
start int
end int
return void
コード例 #1
0
 public virtual Chunk GetChunks(int offset, int length)
 {
     SyntaxModeService.ScanSpans(doc, mode, spanParser.CurRule, spanParser.SpanStack, line.Offset, offset);
     length   = System.Math.Min(doc.Length - offset, length);
     str      = length > 0 ? doc.GetTextAt(offset, length) : null;
     curChunk = new Chunk(offset, 0, GetSpanStyle());
     spanParser.ParseSpans(offset, length);
     curChunk.Length = offset + length - curChunk.Offset;
     if (curChunk.Length > 0)
     {
         curChunk.Style = GetStyle(curChunk) ?? GetSpanStyle();
         AddRealChunk(curChunk);
     }
     return(startChunk);
 }
コード例 #2
0
            public virtual Chunk GetChunks(int offset, int length)
            {
                if (lineOffset < offset)
                {
                    SyntaxModeService.ScanSpans(doc, mode, spanParser.CurRule, spanParser.SpanStack, lineOffset, offset);
                }
                length = System.Math.Min(doc.TextLength - offset, length);
                var minOffset = curChunk == null ? 0 : curChunk.Offset + curChunk.Length;

                curChunk = new Chunk(offset, 0, GetSpanStyle());
                spanParser.ParseSpans(offset, length);
                curChunk.SpanStack = spanParser.SpanStack;
                curChunk.Length    = offset + length - curChunk.Offset;
                if (curChunk.Length > 0 && curChunk.Offset >= minOffset)
                {
                    curChunk.Style = GetStyle(curChunk) ?? GetSpanStyle();
                    AddRealChunk(curChunk);
                }
                return(startChunk);
            }