public void AddCode(CsStmt line) { if (line != null) { Code.Add(line); } }
public void AddBranch(string cond, CsStmt code) { cond = NormaliseCondition(cond); _conditions.Add(cond); _thenBranches[cond] = new List <CsStmt> { code }; }
public void AddToBranch(string cond, CsStmt code) { if (String.IsNullOrEmpty(cond)) { AddElse(code); } else if (!ThenBranches.ContainsKey(cond)) { AddBranch(cond, code); } else { ThenBranches[cond].Add(code); } }
public void AddToBranch(string cond, CsStmt code) { cond = NormaliseCondition(cond); if (String.IsNullOrEmpty(cond)) { AddElse(code); } else if (!_thenBranches.ContainsKey(cond)) { AddBranch(cond, code); } else { _thenBranches[cond].Add(code); } }
public void AddElse(CsStmt code) { _elseBranch.Add(code); }
public void AddCode(CsStmt stmt) { Code.Add(stmt); }
public void AddBranch(string cond, CsStmt code) { Conditions.Add(cond); ThenBranches[cond] = new List <CsStmt>(); ThenBranches[cond].Add(code); }