public sealed override double Evaluate(Tree<SyntaxToken> tree, EvaluationContext context)
		{
			var left = tree.Leafs[0];
			var right = tree.Leafs[1];

			return Evaluate(left.Value.Evaluate(left, context), right.Value.Evaluate(right, context));
		}
		public static double Evaluate(this AST tree, EvaluationContext context)
		{
			return tree.Value.Evaluate(tree, context);
		}
Пример #3
0
 public abstract double Evaluate(Tree<SyntaxToken> tree, EvaluationContext context);