mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: minor simplification of stmt
(#7550)
This commit is contained in:
parent
8cd74df2f3
commit
3345925883
@ -629,8 +629,7 @@ pub fn (mut p Parser) stmt(is_top_level bool) ast.Stmt {
|
||||
.key_for {
|
||||
return p.for_stmt()
|
||||
}
|
||||
.name, .key_mut, .key_shared, .key_atomic, .key_static, .mul {
|
||||
if p.tok.kind == .name {
|
||||
.name {
|
||||
if p.tok.lit == 'sql' {
|
||||
return p.sql_stmt()
|
||||
}
|
||||
@ -671,7 +670,6 @@ pub fn (mut p Parser) stmt(is_top_level bool) ast.Stmt {
|
||||
p.error_with_pos('`$p.tok.lit` evaluated but not used', p.tok.position())
|
||||
return ast.Stmt{}
|
||||
}
|
||||
}
|
||||
return p.parse_multi_expr(is_top_level)
|
||||
}
|
||||
.comment {
|
||||
|
Loading…
Reference in New Issue
Block a user