Skip to content

Commit ed63831

Browse files
committed
Fix inline comments regex
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
1 parent bc202c6 commit ed63831

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)