Skip to content

Commit 04dee1a

Browse files
author
cabrol
committed
fixed multi-lines comment parsing to resubmit the breaking PR
Signed-off-by: cabrol <[email protected]>
1 parent 46d29a2 commit 04dee1a

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
@@ -356,7 +356,7 @@ def _parse_fields_enums(self, s):
356356
values = {}
357357
valuesDetails = {}
358358
fields = re.finditer(
359-
r'(\n?[ ]*\/\/[^\n]*\n)*[ ]*(?P<commentBlock>\/\*(\*(?!\/)|[^*])*\*\/)?[ \t\r\n]*(?P<value>[a-zA-z][^\n,/]*),?[ ]*(?P<commentBlockAfter>\/\*(\*(?!\/)|[^*])*\*\/)?(\n?[ ]*\/\/[^\n]*\n*)*',
359+
r'(\n?[ ]*\/\/[^\n]*\n)*[ ]*(?P<commentBlock>\/\/[^\n]*$|\/(?!\\)\*[\s\S]*?\*(?!\\)\/)?[ \t\r\n]*(?P<value>[ ]*[a-zA-z][^\n,\/]*),?[ ]*(?P<commentBlockAfter>\/\*(\*(?!\/)|[^*])*\*\/)?(\n?[ ]*\/\/[^\n]*\n*)*',
360360
s,
361361
)
362362

0 commit comments

Comments
 (0)