Menu

#61 Enum Name missing

v1.0 (example)
closed-fixed
CppEnum (2)
5
2016-09-06
2016-02-23
No

following the next header file example:

ifndef TEST_HEADER_H
define TEST_HEADER_H
typedef struct
{ 
    enum TestClassEnum : int 
    { 
        FAIL = 0,
        PASS = 1
    }; 
} TestStruct;

endif

the name for the TestClassEnum will not be available in the CppEnum object

note:
I'm new to python and not yet fully understand the parsing code logic and execution sequence (much more descriptive comments would be nice to have) but mean while in my version 2.7.2 I've fixed the issue by applying the following change:
in CppHeadeParser.py, method init of class CppEnum changed line 1123: from: if (len(preBraceStack) == 2 and "typedef" not in nameStack): to: if (len(preBraceStack) >= 2 and len(preBraceStack) <= 4) and "typedef" not in nameStack:

Discussion

  • Jashua Cloutier

    Jashua Cloutier - 2016-09-06

    Fixed in commit 3ba0648e8f42

     
  • Jashua Cloutier

    Jashua Cloutier - 2016-09-06
    • status: open --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.