Пример #1
0
 private LoopNode parseLoop(List <string> tokens)
 {
     if (tokens[0] == "while_t")
     {
         var node = new LoopNode(LoopType.While);
         var(e, body) = parseWhile(tokens);
         node.setWhilte(e, body);
         return(node);
     }
     else
     {
         var node = new LoopNode(LoopType.For);
         var(i, it, body) = parseFor(tokens);
         node.setFor(i, it, body);
         return(node);
     }
 }
Пример #2
0
 public void setLoop(LoopNode _loop)
 {
     fields.Add("value", _loop);
     children.Add(_loop);
 }