public override void Visit(StructDclNode node) { CSharpString.Append("class "); node.Id.Accept(this); CSharpString.Append("{"); IndentationLevel++; PrettyPrintNewLine(); foreach (DeclarationNode DclNode in node.Declarations) { CSharpString.Append("public "); DclNode.Accept(this); } if (node.Constructor == null || node.Constructor.FormalParamNodes.Count > 0) { CSharpString.Append("public " + node.Id.Id + "_()"); CSharpString.Append("{"); PrettyPrintNewLine(); CSharpString.Append("}"); PrettyPrintNewLine(); } node.Constructor?.Accept(this); IndentationLevel--; PrettyPrintNewLine(); CSharpString.Append("}"); }
public override void Visit(StructDclNode node) { Console.Write("struct "); node.Id.Accept(this); Console.Write("{"); IndentationLevel++; PrettyPrintNewLine(); foreach (DeclarationNode DclNode in node.Declarations) { DclNode.Accept(this); } node.Constructor.Accept(this); IndentationLevel--; PrettyPrintNewLine(); Console.Write("}"); }
internal abstract void Visit(StructDclNode node);
public abstract void Visit(StructDclNode node);