#45 Crashes parsing ::enum

closed-fixed
nobody
None
5
2012-09-20
2012-09-19
bgrupczy
No

CODE:
from CppHeaderParser import CppHeader
code = """
class Classy
{
public:
enum enum1
{
e1, // 00
e2, // 01
};
UINT32 a;
};

void vFunc(struct s1 *pS,
Classy::enum1 x,
MYTYPE myVar);
"""
cppheader = CppHeader(code, argType="string")
print cppheader

OUTPUT:
Traceback (most recent call last):
File "C:\eclipse_wa_python\t4\parser.py", line 18, in <module>
cppheader = CppHeader(code, argType="string")
File "C:\Python27\lib\site-packages\CppHeaderParser\CppHeaderParser.py", line 2124, in __init__
self.finalize()
File "C:\Python27\lib\site-packages\CppHeaderParser\CppHeaderParser.py", line 1463, in finalize
self.finalize_vars()
File "C:\Python27\lib\site-packages\CppHeaderParser\CppHeaderParser.py", line 1306, in finalize_vars
if 'method' in var: var['enum'] = var['method']['path'] + '::' + enum['name']
KeyError: 'path'

Discussion

    • status: open --> closed-fixed
     
  • Fixed in commit 97:1995d4db9ba0