bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

handling of enums


From: polzin_spamprotect_
Subject: handling of enums
Date: Thu, 25 Oct 2007 15:27:32 +0200

Hi,

I noticed another parsing speciality: In c++ "typedef enum" and "enum" is equally valid code. Gtags-parser handles them differently. Furthermore, I would suggest that the type names of enums are "tags" not "symbols", at least, if "--typedef" is given ("--typedef: Pick up not only function but also typedef name and enum member as a definition."). Probably, some of items apply to the C parser as well. For an example, see below.

Regards, and thanks for global... Tobias

----------------------
typedef enum enumTypedefType
{
  AAA
};
enum enumType
{
  BBB
};
----------------------


Expected:
>> gtags-parser -t  enum.h
enumTypedefType     1 enum.h           typedef enum enumTypedefType
AAA                 3 enum.h             AAA
enumType            5 enum.h           enum enumType
BBB                 7 enum.h             BBB

>> gtags-parser -st  enum.h



Seen:
>> gtags-parser -t  enum.h
AAA                 3 enum.h             AAA

>> gtags-parser -st  enum.h
enumTypedefType     1 enum.h           typedef enum enumTypedefType
enumType            5 enum.h           enum enumType
BBB                 7 enum.h             BBB



reply via email to

[Prev in Thread] Current Thread [Next in Thread]