public static new LexemSwitch Parse(ref string text) { if (String.IsNullOrEmpty(text)) return null; text = text.Trim(); if (!text.StartsWith("?") && !text.StartsWith(":")) return null; var result = new LexemSwitch(text[0].ToString()); text = text.Crop(1); return result; }
protected abstract void OnSwitch(LexemSwitch lexem, LexemList condition, LexemList then, LexemList other);
protected override void OnSwitch(LexemSwitch lexem, LexemList condition, LexemList then, LexemList other) { this.AnalysLogical(condition); _lexems.Add(lexem); this.AnalysExpression(then); _lexems.Add(lexem.Simetric); this.AnalysExpression(other); lexem.End = _lexems[_lexems.Count - 1]; }