Skip to content

Commit 48a3f87

Browse files
authored
Merge pull request #11 from ACRIOS-Systems/bugfix/fix_inline_comments
Fix inline comments regex
2 parents bc202c6 + ed63831 commit 48a3f87

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
@@ -91,7 +91,7 @@ def __repr__(self):
9191

9292
#common regex values
9393
COMMENT_MULTILINE = r'/\*[^*]*\*+(?:[^/*][^*]*\*+)*/'
94-
COMMENT_INLINE = r'//[^\n]*'
94+
COMMENT_INLINE = r'//[^\n]*\n'
9595
COMMENT_MULTILINE_REPEATED = r'(^[ ]*('+COMMENT_INLINE+r'|'+COMMENT_MULTILINE+r'([ ]*('+COMMENT_INLINE+r'|'+COMMENT_MULTILINE+r'))*)[ \t\r]*\n?)*^[ ]*('+COMMENT_INLINE+r'|(?P<commentBlock>'+COMMENT_MULTILINE+r'))+'
9696
COMMENT_REGEX_START=r'('+COMMENT_MULTILINE_REPEATED+r')?[ \t\r\n]*'
9797
COMMENT_REGEX_END =r'(?P<commentBlockAfter>(([ ]*'+COMMENT_MULTILINE+r')+)?[ ]*('+COMMENT_INLINE+r')?)?[ \t\r]*'

0 commit comments

Comments
 (0)