From 7c7d9477ca385a87ad99adb8b9c6cf55dcf0d517 Mon Sep 17 00:00:00 2001 From: Luke Kucalaba Date: Sat, 19 Sep 2020 13:10:40 -0400 Subject: [PATCH] Added 'isclass' boolean key to CppEnum to indicate enum is an 'enum class' --- CppHeaderParser/CppHeaderParser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CppHeaderParser/CppHeaderParser.py b/CppHeaderParser/CppHeaderParser.py index 68e374f..a4c8dbf 100644 --- a/CppHeaderParser/CppHeaderParser.py +++ b/CppHeaderParser/CppHeaderParser.py @@ -1384,6 +1384,7 @@ def __init__(self, name, doxygen, location): self["name"] = name self["namespace"] = "" self["typedef"] = False + self["isclass"] = False self["values"] = [] set_location_info(self, location) @@ -3488,8 +3489,10 @@ def _parse_enum(self): location = tok.location + is_class = False nametok = self.lex.token() if nametok.value in ("class", "struct"): + is_class = True nametok = self.lex.token() if nametok.value == "__attribute__": @@ -3521,6 +3524,8 @@ def _parse_enum(self): newEnum = CppEnum(name, doxygen, location) if is_typedef: newEnum["typedef"] = True + if is_class: + newEnum["isclass"] = True if base: newEnum["type"] = "".join(base) 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