Ejemplo n.º 1
0
        private void ParseText(Row Row, Span currentSpan, string Text)
        {
            int  CurrentPosition = 0;
            bool HasComplex      = true;

            while (true)
            {
                ScanResultWord Word = GetNextWord(Text, currentSpan, CurrentPosition,
                                                  ref HasComplex);

                if (!Word.HasContent)
                {
                    ParseTools.AddString(Text.Substring(CurrentPosition), Row,
                                         currentSpan.spanDefinition.Style, currentSpan);
                    break;
                }
                ParseTools.AddString(Text.Substring(CurrentPosition, Word.Position -
                                                    CurrentPosition), Row,
                                     currentSpan.spanDefinition.Style, currentSpan);
                ParseTools.AddPatternString(Word.Token, Row, Word.Pattern,
                                            Word.ParentList.Style, currentSpan,
                                            false);
                CurrentPosition = Word.Position + Word.Token.Length;
            }
        }