8000 Merge pull request #49 from kucalaba/master · robotpy/robotpy-cppheaderparser@9448af1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9448af1

Browse files
authored
Merge pull request #49 from kucalaba/master
Added 'isclass' boolean key to CppEnum to indicate enum is an 'enum c…
2 parents 97c3bdc + 7c7d947 commit 9448af1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CppHeaderParser/CppHeaderParser.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,7 @@ def __init__(self, name, doxygen, location):
13841384
self["name"] = name
13851385
self["namespace"] = ""
13861386
self["typedef"] = False
1387+
self["isclass"] = False
13871388
self["values"] = []
13881389
set_location_info(self, location)
13891390

@@ -3488,8 +3489,10 @@ def _parse_enum(self):
34883489

34893490
location = tok.location
34903491

3492+
is_class = False
34913493
nametok = self.lex.token()
34923494
if nametok.value in ("class", "struct"):
3495+
is_class = True
34933496
nametok = self.lex.token()
34943497

34953498
if nametok.value == "__attribute__":
@@ -3521,6 +3524,8 @@ def _parse_enum(self):
35213524
newEnum = CppEnum(name, doxygen, location)
35223525
if is_typedef:
35233526
newEnum["typedef"] = True
3527+
if is_class:
3528+
newEnum["isclass"] = True
35243529
if base:
35253530
newEnum["type"] = "".join(base)
35263531

0 commit comments

Comments
 (0)
0