Skip to content

Commit 7c7d947

Browse files
committed
Added 'isclass' boolean key to CppEnum to indicate enum is an 'enum class'
1 parent 97c3bdc commit 7c7d947

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy