mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: minor cleanup in stmt() (#14136)
This commit is contained in:
parent
a2db44bc38
commit
b86320a669
@ -791,7 +791,7 @@ pub fn (mut p Parser) stmt(is_top_level bool) ast.Stmt {
|
||||
spos := p.tok.pos()
|
||||
name := p.check_name()
|
||||
if name in p.label_names {
|
||||
p.error_with_pos('duplicate label `$name`', spos)
|
||||
return p.error_with_pos('duplicate label `$name`', spos)
|
||||
}
|
||||
p.label_names << name
|
||||
p.next()
|
||||
@ -812,7 +812,7 @@ pub fn (mut p Parser) stmt(is_top_level bool) ast.Stmt {
|
||||
return stmt
|
||||
}
|
||||
else {
|
||||
p.error_with_pos('unknown kind of For statement', for_pos)
|
||||
return p.error_with_pos('unknown kind of For statement', for_pos)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user