private EXPR CreateProperty(
SymWithType swt,
EXPR callingObject,
BindingFlag flags)
{
// For a property, we simply create the EXPRPROP for the thing, call the
// expression tree rewriter, rewrite it, and send it on its way.
PropertySymbol property = swt.Prop();
AggregateType propertyType = swt.GetType();
PropWithType pwt = new PropWithType(property, propertyType);
EXPRMEMGRP pMemGroup = CreateMemberGroupEXPR(property.name.Text, null, callingObject, SYMKIND.SK_PropertySymbol);
return _binder.BindToProperty(// For a static property instance, don't set the object.
callingObject.isCLASS() ? null : callingObject, pwt, flags, null, null, pMemGroup);
}