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