Skip to content

Commit f67e878

Browse files
committed
Make typedef detection simpler
1 parent 443f5e3 commit f67e878

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

CppHeaderParser/CppHeaderParser.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3289,10 +3289,14 @@ def _evaluate_stack(self, token=None):
32893289
except:
32903290
pass
32913291

3292+
if len(self.nameStack) == 0:
3293+
debug_print("trace (Empty Stack)")
3294+
return
3295+
32923296
# if 'typedef' in self.nameStack: self._evaluate_typedef() # allows nested typedefs, probably a bad idea
3293-
if (
3297+
elif (
32943298
not self.curClass
3295-
and "typedef" in self.nameStack
3299+
and self.nameStack[0] == "typedef"
32963300
and (
32973301
self.stack[-1] == ";"
32983302
or (
@@ -3307,9 +3311,6 @@ def _evaluate_stack(self, token=None):
33073311
self._evaluate_typedef()
33083312
return
33093313

3310-
elif len(self.nameStack) == 0:
3311-
debug_print("trace (Empty Stack)")
3312-
return
33133314
elif self.nameStack[0] == "namespace":
33143315
# Taken care of outside of here
33153316
pass

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