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; }
public static LexemPoliz Create(LexemList lexems) { var result = new LexemPoliz(); result.Analys(lexems); return result; }