private static IEnumerable <RxNode <byte> > MakeSingleRange(RangeSet <int> ranges)
 {
     if (ranges.Count > 0)
     {
         return(new RxMatch <byte>(new RangeSet <byte>(ranges.Select(range => Range <byte> .Create((byte)range.From, (byte)range.To)))).Yield());
     }
     return(Enumerable.Empty <RxMatch <byte> >());
 }
Ejemplo n.º 2
0
 private static IEnumerable <RxNode <char> > MakeSingleRange(RangeSet <Codepoint> ranges)
 {
     if (ranges.Count > 0)
     {
         return(new RxMatch <char>(new RangeSet <char>(ranges.Select(r => Range <char> .Create((char)r.From, (char)r.To)))).Yield());
     }
     return(Enumerable.Empty <RxNode <char> >());
 }
        private SparseIndexing RootCreateIndices()
        {
            SparseIndexing rootLevel = new SparseIndexing();

            rootLevel.Indexes = TriIndexSet.Select(range => new SparseSet()
            {
                Start = range.Start, Stop = range.Stop
            }).ToArray();
            return(rootLevel);
        }
 private static RangeSet <int> Intersect(RangeSet <Codepoint> codepointRanges, Range <int> intRange)
 {
     return(new RangeSet <int>(codepointRanges.Select(IntRange)) & intRange);
 }