mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-15 00:57:35 +00:00
pkg/ast: fix struct comment parsing
This commit is contained in:
parent
a54dce007d
commit
f400a0da0f
@ -353,6 +353,8 @@ func (p *parser) parseCommentBlock() []*Comment {
|
||||
for p.tok == tokComment {
|
||||
comments = append(comments, p.parseComment())
|
||||
p.consume(tokNewLine)
|
||||
for p.tryConsume(tokNewLine) {
|
||||
}
|
||||
}
|
||||
return comments
|
||||
}
|
||||
|
11
pkg/ast/testdata/all.txt
vendored
11
pkg/ast/testdata/all.txt
vendored
@ -28,3 +28,14 @@ include <linux/foo.h>
|
||||
include "linux/foo.h"
|
||||
incdir </foo/bar>
|
||||
incdir "/foo/bar"
|
||||
|
||||
s2 {
|
||||
f1 int8
|
||||
|
||||
# comment
|
||||
|
||||
f2 int8
|
||||
|
||||
# comment
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user