public static string Write(object One, ref LswMySql.MySqlPositions MySqlPosition) { string Return = "ELSEIF "; LsElseIf Two = (LsElseIf)One; Return += new MySqlControler().Out(new LsBaseList() { Bases = new List <lsBase>() { Two.Bracket } }).TrimEnd("\r\n".ToCharArray()) + " THEN\r\n"; Return = Return.Replace("((", "("); foreach (var item in Two.InerLines) { Return += "\t" + new MySqlControler().Out(new LsBaseList() { Bases = new List <lsBase>() { item } }); } if (Two.EndIf) { Return += "END IF;\r\n"; } return(Return); }
public static LsBracket Read(string One, ref LswMySql.MySqlPositions MySqlPosition) { LsBracket Two = new LsBracket(); string Three = One[0].ToString(); switch (Three) { case "<": Three = Three + "|>"; break; case "(": Three = Three + "|)"; break; case "[": Three = Three + "|]"; break; case "{": Three = Three + "|}"; break; default: Three = "(|)"; break; } if (Two.BracketTypesPears.ContainsValue(Three)) { Two.BracketType = Dic.KeyByValue(Three); // // } else { Two.BracketType = LsBracket.BracketTypes.Round; } //do //{ string[] Parts; Parts = One.Trim().Substring(1, One.Length - 2).Split(Seperater(Two.BracketType).ToCharArray()); foreach (var item in Parts) { string itemT = item.Trim(); var Four = new MySqlControler().PartInRef(itemT, ref MySqlPosition); if (Four is string && (itemT[0] != '"' && itemT[0] != "'"[0])) { Two.AddString(new LsName() { Name = Four.ToString() }); } else { Two.AddBase(Four); } } MySqlPosition.Position++; try { One = MySqlPosition.InLine[MySqlPosition.Position]; } catch { } //} while(CheckRepeate(One, Two)); MySqlPosition.Position = MySqlPosition.Position - 1; return(Two); }