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("}");
        }
Esempio n. 2
0
 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("}");
 }
Esempio n. 3
0
 internal abstract void Visit(StructDclNode node);
Esempio n. 4
0
 public abstract void Visit(StructDclNode node);