mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci: fix failing invalid_struct_decl_script_err.vv
This commit is contained in:
parent
5d8d11c989
commit
01dabe5966
|
@ -325,11 +325,6 @@ pub fn (mut p Parser) check_expr(precedence int) ?ast.Expr {
|
||||||
node = p.map_init()
|
node = p.map_init()
|
||||||
p.check(.rcbr)
|
p.check(.rcbr)
|
||||||
}
|
}
|
||||||
.key_struct {
|
|
||||||
// Anonymous struct
|
|
||||||
p.next()
|
|
||||||
return p.struct_init('', .anon)
|
|
||||||
}
|
|
||||||
.key_fn {
|
.key_fn {
|
||||||
if p.expecting_type {
|
if p.expecting_type {
|
||||||
// Anonymous function type
|
// Anonymous function type
|
||||||
|
@ -362,6 +357,11 @@ pub fn (mut p Parser) check_expr(precedence int) ?ast.Expr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if p.tok.kind == .key_struct && p.peek_tok.kind == .lcbr {
|
||||||
|
// Anonymous struct
|
||||||
|
p.next()
|
||||||
|
return p.struct_init('', .anon)
|
||||||
|
}
|
||||||
if p.tok.kind != .eof && !(p.tok.kind == .rsbr && p.inside_asm) {
|
if p.tok.kind != .eof && !(p.tok.kind == .rsbr && p.inside_asm) {
|
||||||
// eof should be handled where it happens
|
// eof should be handled where it happens
|
||||||
return none
|
return none
|
||||||
|
|
Loading…
Reference in New Issue
Block a user