Ejemplo n.º 1
0
 public virtual void VisitSetAccessor(BoundSetAccessor node)
 {
     DefaultVisit(node);
 }
Ejemplo n.º 2
0
 private void EmitSetAccessor(BoundSetAccessor node)
 {
     // Push the target onto the stack.
     EmitExpression(node.Expression);
     // Push the identifier onto the stack.
     IL.EmitConstant(_identifierManager.ResolveIdentifier(node.Name));
     // Push the getter onto the stack.
     if (node.GetFunction != null)
         EmitExpression(node.GetFunction);
     else
         IL.Emit(OpCodes.Ldnull);
     // Push the setter onto the stack.
     if (node.SetFunction != null)
         EmitExpression(node.SetFunction);
     else
         IL.Emit(OpCodes.Ldnull);
     // Call the define accessor.
     IL.EmitCall(_objectDefineAccessor);
 }