Exemplo n.º 1
0
 public override object VisitVariableName(BoundVariableName x)
 {
     return(x.Update(
                x.NameValue,
                (BoundExpression)Accept(x.NameExpression)));
 }
Exemplo n.º 2
0
        public BoundIndirectFieldPlace(BoundExpression instance, BoundVariableName name, BoundAccess access)
        {
            Contract.ThrowIfNull(name);

            _instance = instance;
            _name = name;
            _access = access;
        }
Exemplo n.º 3
0
 public BoundIndirectStFieldPlace(BoundTypeRef typeref, BoundVariableName fldname, BoundFieldRef boundref)
 {
     _type = typeref;
     _name = fldname;
     _boundref = boundref;
 }
Exemplo n.º 4
0
        BoundExpression BindFieldUse(AST.StaticFieldUse x, BoundAccess access)
        {
            var typeref = BindTypeRef(x.TargetType);
            BoundVariableName varname;

            if (x is AST.DirectStFldUse)
            {
                var dx = (AST.DirectStFldUse)x;
                varname = new BoundVariableName(dx.PropertyName);
            }
            else if (x is AST.IndirectStFldUse)
            {
                var ix = (AST.IndirectStFldUse)x;
                var fieldNameExpr = BindExpression(ix.FieldNameExpr, BoundAccess.Read);

                varname = new BoundVariableName(fieldNameExpr);
            }
            else
            {
                throw ExceptionUtilities.UnexpectedValue(x);
            }

            return BoundFieldRef.CreateStaticField(typeref, varname);
        }