public PrefixedExpression(Expression expression, Boolean? common) { if (expression == null) throw new ArgumentNullException("expression"); m_expression = expression; m_common = common; }
Object ToRectangle(String s) { Evaluation.Expression expression = (Evaluation.Expression)ToExpression(s); Rectangle?rectangle = EvaluationHelper.AsRectangle(null, expression, null); if (rectangle == null) { return(Failure); } return(rectangle.Value); }
Expression BuildExpression(String input) { if (input == null) throw new ArgumentNullException("input"); //Quoted strings must be case sensitive & cache is not case sensitive if (input.IndexOf('"') == -1 && m_expressioncache.Contains(input) == true) return m_expressioncache[input]; List<Token> tokens = m_tokenizer.Tokenize(input); List<Node> nodes = m_treebuilder.BuildTree(tokens); List<EvaluationCallback> functions = new List<EvaluationCallback>(); foreach (Node node in nodes) functions.Add(m_compiler.Create(node)); Expression expression = new Expression(input, functions); if (input.IndexOf('"') == -1) m_expressioncache.Add(expression); return expression; }