Beispiel #1
0
 public void AddLookup(RegexItem item, int startLocation, int endLocation, bool canCoalesce)
 {
     if (this.inSeries)
     {
         if (canCoalesce)
         {
             RegexRef ref2 = (RegexRef)this.expressionLookup[this.expressionLookup.Count - 1];
             ref2.StringValue = ref2.StringValue + item.ToString(0);
             ref2.Length     += (endLocation - startLocation) + 1;
         }
         else
         {
             this.expressionLookup.Add(new RegexRef(item, startLocation, endLocation));
             this.inSeries = false;
         }
     }
     else
     {
         if (canCoalesce)
         {
             this.inSeries = true;
         }
         this.expressionLookup.Add(new RegexRef(item, startLocation, endLocation));
     }
 }
 public RegexRef(RegexItem regexItem, int start, int end)
 {
     this.stringValue = regexItem.ToString(0);
     this.start = start;
     this.end = end;
 }
 public RegexRef(RegexItem regexItem, int start, int end)
 {
     this.stringValue = regexItem.ToString(0);
     this.start       = start;
     this.end         = end;
 }