コード例 #1
0
ファイル: LexemSymbol.cs プロジェクト: sxkote/sxcore
        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;
        }
コード例 #2
0
ファイル: LexemAnalyzer.cs プロジェクト: sxkote/sxcore
 protected abstract void OnSwitch(LexemSwitch lexem, LexemList condition, LexemList then, LexemList other);
コード例 #3
0
ファイル: LexemPoliz.cs プロジェクト: sxkote/sxcore
        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];
        }