public override object VisitVariableName(BoundVariableName x) { return(x.Update( x.NameValue, (BoundExpression)Accept(x.NameExpression))); }
public BoundIndirectFieldPlace(BoundExpression instance, BoundVariableName name, BoundAccess access) { Contract.ThrowIfNull(name); _instance = instance; _name = name; _access = access; }
public BoundIndirectStFieldPlace(BoundTypeRef typeref, BoundVariableName fldname, BoundFieldRef boundref) { _type = typeref; _name = fldname; _boundref = boundref; }
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); }