Exemple #1
0
 public override string Output(LinqParser parser)
 {
     return(string.Format("({0}) {{ {1} }}",
                          parser.MapType(StructType),
                          InitFields.Select(t => (StructType.IsCLUnion() ?
                                                  string.Format(".{0} = {1}", t.Item1.Output(parser), t.Item2.Output(parser)) :
                                                  t.Item2.Output(parser)))
                          .SeparateWith(", ")));
 }
Exemple #2
0
            public override Ast Transform(Func <Ast, Ast> transform)
            {
                var ifs = InitFields.Select(t => Tuple.Create(
                                                (VariableRef)t.Item1.Transform(transform),
                                                (Expression)t.Item2.Transform(transform)));

                return(transform(ifs.SequenceEqual(InitFields) ? this :
                                 new ClcInitStruct(StructType, ifs)));
            }
Exemple #3
0
 public override string Output(LinqParser parser)
 {
     return(string.Format("{0} ({1})", InitFields.Select(t => t.Item2.Output(parser))
                          .SeparateWith(", ")));
 }