public override Exp Analy( ) { LeftExp = AnalySubExp(LeftExp); //bool rightOK = false; if (RightExp is ExpEachWord) { var eachItemExp = AnalyEach(); Exp newExp = eachItemExp.Analy(); return(newExp); } else { ParseRightPropertyName(); } if (!this.AnalyCorrect) { return(this); } //if (!rightOK) return this; //if (!LeftExp.AnalyResult) return this; if (LeftExp.RetType is ZEnumType) { ErrorE(RightExp.Postion, "约定没有属性"); } else if (LeftExp.RetType is ZClassType) { ZClassType zclass = LeftExp.RetType as ZClassType; ZMember = zclass.SearchZMember(propertyName); if (ZMember == null) { ErrorE(LeftExp.Postion, "不存在'{0}'属性", propertyName); } else { RetType = ZMember.MemberZType; } } else { throw new CompileException(); } return(this); }
public ZMemberInfo SearchMember(string zname) { if (classType == null) { return(null); } ZMemberInfo zmember = classType.SearchZMember(zname); if (zmember == null) { return(null); } if (zmember.AccessAttribute != AccessAttributeEnum.Private) { return(zmember); } return(null); }