parser: fix last_line of no body C struct (#9809)
parent
7abf59710b
commit
2df260acbb
|
@ -58,3 +58,5 @@ pub:
|
|||
14
|
||||
*/
|
||||
}
|
||||
|
||||
struct C.Foo {}
|
||||
|
|
|
@ -61,3 +61,5 @@ somefield4 int
|
|||
14
|
||||
*/
|
||||
}
|
||||
|
||||
struct C.Foo
|
||||
|
|
|
@ -96,7 +96,7 @@ fn (mut p Parser) struct_decl() ast.StructDecl {
|
|||
mut is_field_mut := false
|
||||
mut is_field_pub := false
|
||||
mut is_field_global := false
|
||||
mut last_line := -1
|
||||
mut last_line := p.prev_tok.position().line_nr + 1
|
||||
mut end_comments := []ast.Comment{}
|
||||
if !no_body {
|
||||
p.check(.lcbr)
|
||||
|
|
Loading…
Reference in New Issue