///------------------------------------------------------------- public IgnorableBlock(IgnorableStyle type, bool isLine, int start, int end) { this.ignorableStyle = type; this.isLine = isLine; this.start = start; this.end = end; }
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; }
///------------------------------------------------------------- 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); }
///------------------------------------------------------------- public CsharpIgnorableMatch(IgnorableStyle type, string start, string end, bool isLine = false) : this(type, start, String.Empty, end, isLine) { }