public void TypeDeclaration(CParser.TypeDeclaration TypeDeclaration)
        {
            var CStructType = TypeDeclaration.Symbol.CType.GetCUnionStructType();

            if (CStructType != null)
            {
                Console.WriteLine("");
                Console.WriteLine("\t/// <summary>");
                Console.WriteLine("\t/// </summary>");
                Console.WriteLine("\tpublic struct {0}", TypeDeclaration.Symbol.Name);
                Console.WriteLine("\t{");
                {
                    for (int n = 0; n < CStructType.Items.Count; n++)
                    {
                        var Item = CStructType.Items[n];
                        if (n != 0)
                        {
                            Console.WriteLine("");
                        }
                        Console.WriteLine("\t\t/// <summary>");
                        Console.WriteLine("\t\t/// </summary>");
                        Console.WriteLine("\t\tpublic {0} {1};", ConvertCTypeToTypeString(Item.CType), Item.Name);
                    }
                }
                Console.WriteLine("\t}");
            }
        }
示例#2
0
        public void TypeDeclaration(CParser.TypeDeclaration TypeDeclaration)
        {
            PutDebugLine(TypeDeclaration);

            CustomTypeContext.SetTypeByCType(TypeDeclaration.Symbol.CType, DefineType(TypeDeclaration.Symbol));
        }