Пример #1
0
 private void Write(TupleExpressionNode exp)
 {
     for (var i = 0; i < exp.Children.Count; i++)
     {
         Write(exp.Children[i]);
         if (i < exp.Children.Count - 1)
         {
             _code.Append(", ");
         }
     }
 }
Пример #2
0
        private static PythonNode Wrap(TupleExpression exp, PythonNode parent)
        {
            var result = new TupleExpressionNode(exp)
            {
                Parent = parent
            };

            result.Value = exp.IsExpandable;
            foreach (var item in exp.Items)
            {
                result.AddChild(Wrap(item, result));
            }
            return(result);
        }