Exemple #1
0
		public HighlightInfo(Span curSpan, bool span, bool blockSpanOn)
		{
			this.CurSpan		 = curSpan;
			this.Span				= span;
			this.BlockSpanOn = blockSpanOn;
		}
		void UpdateSpanStateVariables() {
			inSpan = (currentSpanStack != null && !currentSpanStack.IsEmpty);
			activeSpan = inSpan ? currentSpanStack.Peek() : null;
			activeRuleSet = GetRuleSet(activeSpan);
		}
		protected virtual bool OverrideSpan(string spanBegin, IDocument document, List<TextWord> words, Span span, ref int lineOffset) {
			return false;
		}
		public HighlightRuleSet GetRuleSet(Span aSpan) {
			if (aSpan == null) {
				return this.mDefaultRuleSet;
			} else {
				if (aSpan.RuleSet != null) {
					if (aSpan.RuleSet.Reference != null) {
						return aSpan.RuleSet.Highlighter.GetRuleSet(null);
					} else {
						return aSpan.RuleSet;
					}
				} else {
					return null;
				}
			}
		}