예제 #1
0
        public LexemVariable Calculate(ILexemEnvironment environment = null)
        {
            if (_poliz == null)
                _poliz = LexemPoliz.Create(_lexems);

            var result = _poliz.Calculate(environment);

            if (_variable != null && !String.IsNullOrEmpty(_variable.Name) && environment != null && result != null)
                environment.Set(_variable.Name, result.Value);

            return result;
        }
예제 #2
0
파일: LexemPoliz.cs 프로젝트: sxkote/sxcore
 public static LexemPoliz Create(LexemList lexems)
 {
     var result = new LexemPoliz();
     result.Analys(lexems);
     return result;
 }