[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc csdoc.c,1.19,1.20
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc csdoc.c,1.19,1.20 |
Date: |
Wed, 05 Mar 2003 20:04:05 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc
In directory subversions:/tmp/cvs-serv12806/cscc
Modified Files:
csdoc.c
Log Message:
Dump attribute names in the XML documentation output.
Index: csdoc.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csdoc.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** csdoc.c 26 Jan 2003 09:02:07 -0000 1.19
--- csdoc.c 6 Mar 2003 01:04:02 -0000 1.20
***************
*** 89,96 ****
void CCPluginSemAnalysis(void)
{
! /* Perform type gathering only */
CCCodeGen.typeGather = 1;
CCParseTree = CSTypeGather(&CCCodeGen, CCGlobalScope, CCParseTree);
CCCodeGen.typeGather = 0;
}
--- 89,99 ----
void CCPluginSemAnalysis(void)
{
! /* Perform type gathering */
CCCodeGen.typeGather = 1;
CCParseTree = CSTypeGather(&CCCodeGen, CCGlobalScope, CCParseTree);
CCCodeGen.typeGather = 0;
+
+ /* Perform semantic analysis */
+ ILNode_SemAnalysis(CCParseTree, &CCCodeGen, &CCParseTree);
}
***************
*** 163,167 ****
const char *name = ILClass_Name(classInfo);
const char *namespace = ILClass_Namespace(classInfo);
! const char *namespace2 = ILClass_Namespace(other);
if(namespace)
{
--- 166,170 ----
const char *name = ILClass_Name(classInfo);
const char *namespace = ILClass_Namespace(classInfo);
! const char *namespace2 = (other ? ILClass_Namespace(other) : 0);
if(namespace)
{
***************
*** 262,276 ****
/*
! * Dump the attributes for an item.
*/
! static void DumpAttributes(FILE *stream, ILNode *attrs, int indent)
{
! if(attrs && yyisa(attrs, ILNode_AttributeTree))
{
! attrs = ((ILNode_AttributeTree *)attrs)->sections;
}
! /* TODO */
Indent(stream, indent);
! fputs("<Attributes/>\n", stream);
}
--- 265,350 ----
/*
! * Dump a specific attribute.
*/
! static void DumpAttribute(FILE *stream, ILAttribute *attr,
! ILClass *owner, int indent)
{
! ILMethod *ctor;
! ILType *signature;
!
! /* Convert the attribute's type into a constructor reference */
! ctor = ILProgramItemToMethod(ILAttributeTypeAsItem(attr));
! if(!ctor)
{
! return;
}
! signature = ILMethod_Signature(ctor);
!
! /* Output the attribute header */
Indent(stream, indent);
! fputs("<Attribute>\n", stream);
!
! /* Output the attribute name start */
! Indent(stream, indent + 2);
! fputs("<AttributeName>", stream);
! DumpClassNameOther(stream, ILMethod_Owner(ctor), owner);
!
! /* Output the parameters */
! if(ILTypeNumParams(signature) != 0)
! {
! /* TODO: output the constant values for the parameters */
! putc('(', stream);
! putc('?', stream);
! putc(')', stream);
! }
!
! /* Output the attribute name end */
! fputs("</AttributeName>\n", stream);
!
! /* Output the attribute footer */
! Indent(stream, indent + 2);
! fputs("<Excluded>0</Excluded>\n", stream);
! Indent(stream, indent);
! fputs("</Attribute>\n", stream);
! }
!
! /*
! * Dump the attributes for an item.
! */
! static void DumpAttributes(FILE *stream, ILProgramItem *item, int indent)
! {
! ILAttribute *attr = ILProgramItemNextAttribute(item, 0);
! ILClass *owner;
! ILMember *member;
! if(attr)
! {
! owner = ILProgramItemToClass(item);
! if(!owner)
! {
! member = ILProgramItemToMember(item);
! if(member)
! {
! owner = ILMember_Owner(member);
! }
! else
! {
! owner = 0;
! }
! }
! Indent(stream, indent);
! fputs("<Attributes>\n", stream);
! do
! {
! DumpAttribute(stream, attr, owner, indent + 2);
! }
! while((attr = ILProgramItemNextAttribute(item, attr)) != 0);
! Indent(stream, indent);
! fputs("</Attributes>\n", stream);
! }
! else
! {
! Indent(stream, indent);
! fputs("<Attributes/>\n", stream);
! }
}
***************
*** 423,427 ****
/* Dump the attributes for the field */
! DumpAttributes(stream, decl->attributes, indent + 2);
/* Output the field's type */
--- 497,501 ----
/* Dump the attributes for the field */
! DumpAttributes(stream, ILToProgramItem(field), indent + 2);
/* Output the field's type */
***************
*** 498,502 ****
/* Dump the attributes for the enumerated member */
! DumpAttributes(stream, decl->attributes, indent + 2);
/* Output the field's type */
--- 572,576 ----
/* Dump the attributes for the enumerated member */
! DumpAttributes(stream, ILToProgramItem(field), indent + 2);
/* Output the field's type */
***************
*** 756,760 ****
/* Dump the attributes for the method */
! DumpAttributes(stream, decl->attributes, indent + 2);
/* Output the method's type */
--- 830,834 ----
/* Dump the attributes for the method */
! DumpAttributes(stream, ILToProgramItem(method), indent + 2);
/* Output the method's type */
***************
*** 966,970 ****
/* Dump the attributes for the property */
! DumpAttributes(stream, decl->attributes, indent + 2);
/* Output the property's type */
--- 1040,1044 ----
/* Dump the attributes for the property */
! DumpAttributes(stream, ILToProgramItem(property), indent + 2);
/* Output the property's type */
***************
*** 1228,1232 ****
/* Dump the attributes for the type */
! DumpAttributes(stream, defn->attributes, indent);
/* Dump the class members */
--- 1302,1306 ----
/* Dump the attributes for the type */
! DumpAttributes(stream, ILToProgramItem(classInfo), indent);
/* Dump the class members */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc csdoc.c,1.19,1.20,
Rhys Weatherley <address@hidden> <=