Exemplo n.º 1
0
        public override JavaScriptObject Evaluate(Scope scope, JavaScriptObject thisObject)
        {
            if (this.parent is VariableNode)
            {
                VariableNode varNode = ((VariableNode)parent);
                return(next.Evaluate(scope, scope.GetVariable(varNode.Name, varNode.Position)));
            }
            else if (this.parent is PropertyNode)
            {
                PropertyNode propNode = ((PropertyNode)parent);
                return(next.Evaluate(scope, thisObject.GetProperty(propNode.Name, propNode.Position)));
            }

            throw new InvalidTypeException("Expected variable or property", this.Position);
        }
Exemplo n.º 2
0
        public override JavaScriptObject Evaluate(Scope scope, JavaScriptObject thisObject)
        {
            if (this.parent is VariableNode)
            {
                VariableNode varNode = ((VariableNode)parent);
                return next.Evaluate(scope, scope.GetVariable(varNode.Name, varNode.Position));
            }
            else if (this.parent is PropertyNode)
            {
                PropertyNode propNode = ((PropertyNode)parent);
                return next.Evaluate(scope, thisObject.GetProperty(propNode.Name, propNode.Position));
            }

            throw new InvalidTypeException("Expected variable or property", this.Position);
        }
Exemplo n.º 3
0
 public override JavaScriptObject Evaluate(Scope scope, JavaScriptObject thisObject)
 {
     return(thisObject.GetProperty(this.Name, this.Position));
 }
Exemplo n.º 4
0
 public override JavaScriptObject Evaluate(Scope scope, JavaScriptObject thisObject)
 {
     return thisObject.GetProperty(this.Name, this.Position);
 }