public bool Set(string name, Expression expr, bool is_const = false) { if (!consts.Contains(name)) { locals[name] = expr; if (is_const) { consts.Add(name); return true; } return true; } return false; }
public AssignmentExpression(string name, Expression expr) { this.name = name; this.expr = expr; }
public OperatorExpression(char op, Expression a, Expression b) { this.op = op; this.a = a; this.b = b; }
public ReturnValue calculate(Expression expr) { return expr.Value(binding); }