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(", "))); }
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))); }
public override string Output(LinqParser parser) { return(string.Format("{0} ({1})", InitFields.Select(t => t.Item2.Output(parser)) .SeparateWith(", "))); }