Exemple #1
0
 public ScriptIfStatement(AstNodeArgs args)
     : base(args)
 {
     _condition = (ScriptCondition)ChildNodes[1];
     _statement = (ScriptStatement)ChildNodes[2];
     //Else exists
     if (ChildNodes.Count == 4 && ChildNodes[3].ChildNodes.Count == 2 && ChildNodes[3].ChildNodes[1] is ScriptStatement)
     {
         _elseStatement = (ScriptStatement)ChildNodes[3].ChildNodes[1];
     }
 }
 public ScriptIfStatement(AstNodeArgs args)
     : base(args)
 {
   _condition = (ScriptCondition) ChildNodes[1];
   _statement = (ScriptStatement)ChildNodes[2];
   //Else exists
   if (ChildNodes.Count == 4 && ChildNodes[3].ChildNodes.Count == 2 && ChildNodes[3].ChildNodes[1] is ScriptStatement)
   {
     _elseStatement = (ScriptStatement)ChildNodes[3].ChildNodes[1];
   }
 }