public SolidityIfElse AddConditionBlock(string condition, SolidityComponent blockBody) { var conditionBlock = new IfBlock(condition, blockBody, conditionBlocks.Count > 0); conditionBlocks.Add(conditionBlock); return(this); }
public void AddToBody(SolidityComponent component) { if (component != null) { body.Add(component); } }
public void AddComponent(SolidityComponent component) { if (component is SolidityStatement) { components.Insert(0, component); } else { components.Add(component); } }
public IfBlock(string condition, SolidityComponent blockBody, bool isElse) { this.condition = condition; this.blockBody = blockBody; this.isElse = isElse; }
public void AddToBody(SolidityComponent component) { body.Add(component); }