示例#1
0
        public void CloneTest()
        {
            var exp   = new UserFunction("f", new[] { new Number(5) });
            var clone = exp.Clone();

            Assert.Equal(exp, clone);
        }
示例#2
0
        public override JavaScriptObject Evaluate(Scope scope, JavaScriptObject thisObject)
        {
            UserFunction constructorFunction = (UserFunction)scope.GetFunction(this.functionName, this.Position);

            UserFunction newObject = constructorFunction.Clone();

            this.CallFunction(scope, newObject, newObject);

            return(newObject);
        }