Esempio n. 1
0
        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);
     }
 }
Esempio n. 3
0
 public void AddComponent(SolidityComponent component)
 {
     if (component is SolidityStatement)
     {
         components.Insert(0, component);
     }
     else
     {
         components.Add(component);
     }
 }
Esempio n. 4
0
 public IfBlock(string condition, SolidityComponent blockBody, bool isElse)
 {
     this.condition = condition;
     this.blockBody = blockBody;
     this.isElse    = isElse;
 }
Esempio n. 5
0
 public void AddToBody(SolidityComponent component)
 {
     body.Add(component);
 }