Skip to content

Commit aa24d67

Browse files
committed
Merge branch 'support_parenthesis_in_comments' into devel
2 parents 16ea409 + f7b3b29 commit aa24d67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dissect/cstruct/cstruct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def _enums(self, data):
368368
def _structs(self, data):
369369
compiler = Compiler(self.cstruct)
370370
r = re.finditer(
371-
r'(#(?P<flags>(?:compile))\s+)?((?P<typedef>typedef)\s+)?(?P<type>[^\s]+)\s+(?P<name>[^\s]+)?(?P<fields>\s*\{[^}]+\}(?P<defs>\s+[^;\n]+)?)?\s*;',
371+
r'(#(?P<flags>(?:compile))\s+)?((?P<typedef>typedef)\s+)?(?P<type>[^\s]+)\s+(?P<name>[^\s]+)?(?P<fields>\s*\{(\s*//[^\n]*|/\*[^*]*\*/|[^}])+\}(?P<defs>\s+[^;\n]+)?)?\s*;',
372372
data,
373373
)
374374
for t in r:

0 commit comments

Comments
 (0)