public virtual void Visit(StructSyntax pNode) { foreach (var f in pNode.Fields) { f.Accept(this); } pNode.Initializer?.Accept(this); }
public virtual SyntaxNode Visit(StructSyntax pNode) { List <FieldDeclarationSyntax> fields = new List <FieldDeclarationSyntax>(pNode.Fields.Count); foreach (var f in pNode.Fields) { fields.Add(f.Accept <FieldDeclarationSyntax>(this)); } return(SyntaxFactory.Struct(pNode.Name, pNode.Prefix, pNode.TypeArgs, fields, pNode.Initializer?.Accept <BlockSyntax>(this)).WithAttributes(pNode)); }