private IValue interpretOperator(Context context, IValue value, Operator oper) { IMethodDeclaration decl = declaration.findOperator(context, oper, value.GetIType()); context = context.newInstanceContext(this, false).newChildContext(); decl.registerParameters(context); IParameter arg = decl.getParameters()[0]; context.setValue(arg.GetName(), value); return(decl.interpret(context)); }
public override IValue interpret(Context context) { MethodFinder finder = new MethodFinder(context, this); IMethodDeclaration declaration = finder.findBest(true); if (declaration == null) { throw new SyntaxError("No such method: " + this.ToString()); } Context local = selector.newLocalContext(context, declaration); declaration.registerParameters(local); assignArguments(context, local, declaration); return(declaration.interpret(local)); }
public IValue interpret(Context context) { return(wrapped.interpret(context)); }