void AddAssignment(List<CsStat> csCodes, PasAssignment pasAssignment) { var csAssignment = new CsAssignment(); csAssignment.LeftSide = CsValueOf(pasAssignment.LeftSide); csAssignment.RightSide = CsValueOf(pasAssignment.RightSide); csCodes.Add(csAssignment); }
void AddWith(List<CsStat> csCodes, PasWith pasWith) { var csVar = new CsLocalVarDecl { Name = "with" + ((++_generator).ToString()), TypeRef = new CsRef { Decl = new CsAliasTypeDecl { Name = "string", TargetTypeName = "string" } } }; csCodes.Add(csVar); var csAssignment = new CsAssignment(); csAssignment.LeftSide = new CsValue { Kind = CsValueKind.Name, StrData = csVar.Name }; csAssignment.RightSide = CsValueOf(pasWith.SubjectValue); csCodes.Add(csAssignment); AddCodes(csCodes, pasWith.Codes); }