summaryrefslogtreecommitdiff
path: root/tools/generate-operator-out.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/generate-operator-out.py')
-rwxr-xr-xtools/generate-operator-out.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/generate-operator-out.py b/tools/generate-operator-out.py
index c74508d9cd..3bd62fe1db 100755
--- a/tools/generate-operator-out.py
+++ b/tools/generate-operator-out.py
@@ -86,8 +86,10 @@ def ProcessFile(filename):
if m:
enclosing_classes.append(m.group(1))
continue
- m = re.compile(r'^\s*\}( .*)?;').search(raw_line)
- if m:
+
+ # End of class/struct -- be careful not to match "do { ... } while" constructs by accident
+ m = re.compile(r'^\s*\}(\s+)?(while)?(.+)?;').search(raw_line)
+ if m and not m.group(2):
enclosing_classes = enclosing_classes[0:len(enclosing_classes) - 1]
continue