Skip to content

Commit 57770df

Browse files
committed
Update debugging
1 parent e6be5ec commit 57770df

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

CppHeaderParser/CppHeaderParser.py

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,35 @@ def warning_print(fmt, *args):
9898
print(fmt % args)
9999

100100

101-
def debug_print(fmt, *args):
102-
if debug:
101+
if debug:
102+
103+
def debug_print(fmt, *args):
103104
fmt = "[%4d] " + fmt
104105
args = (inspect.currentframe().f_back.f_lineno,) + args
105106
print(fmt % args)
106107

107108

108-
def trace_print(*args):
109-
if debug_trace:
109+
else:
110+
111+
def debug_print(fmt, *args):
112+
pass
113+
114+
115+
if debug_trace:
116+
117+
def trace_print(*args):
110118
sys.stdout.write("[%s] " % (inspect.currentframe().f_back.f_lineno))
111119
for a in args:
112120
sys.stdout.write("%s " % a)
113121
sys.stdout.write("\n")
114122

115123

124+
else:
125+
126+
def trace_print(*args):
127+
pass
128+
129+
116130
#: Access specifiers
117131
supportedAccessSpecifier = ["public", "protected", "private"]
118132

@@ -2861,10 +2875,10 @@ def __init__(self, headerFileName, argType="file", encoding=None, **kwargs):
28612875
self._evaluate_stack()
28622876
self.braceDepth -= 1
28632877

2864-
if self.curClass:
2865-
debug_print(
2866-
"CURBD %s", self._classes_brace_level[self.curClass]
2867-
)
2878+
# if self.curClass:
2879+
# debug_print(
2880+
# "CURBD %s", self._classes_brace_level[self.curClass]
2881+
# )
28682882

28692883
if (self.braceDepth == 0) or (
28702884
self.curClass

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