Пример #1
0
 ///-------------------------------------------------------------
 public IgnorableBlock(IgnorableStyle type, bool isLine, int start, int end)
 {
     this.ignorableStyle = type;
     this.isLine         = isLine;
     this.start          = start;
     this.end            = end;
 }
Пример #2
0
 public CsharpIgnorableMatch(IgnorableStyle type, string start, string ignore, string end, bool isLine = false)
 {
     this.type   = type;
     this.isLine = isLine;
     this.start  = start;
     this.ignore = ignore;
     this.end    = end;
 }
Пример #3
0
        ///-------------------------------------------------------------
        public int AdvanceToSafety(int index, IgnorableStyle typeToAvoid = IgnorableStyle.MAX)
        {
            if (extends == null)
            {
                return(index);
            }

            for (int e = 0; e < extends.Count; e++)
            {
                var extent = extends[e];
                if ((extent.IgnorableStyle & typeToAvoid) != 0 && extent.Contains(index))
                {
                    return(extent.OverEnd);
                }
            }

            return(index);
        }
Пример #4
0
 ///-------------------------------------------------------------
 public CsharpIgnorableMatch(IgnorableStyle type, string start, string end, bool isLine = false) : this(type, start, String.Empty, end, isLine)
 {
 }