1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: fix eating of sql x { ... limit 1 }

This commit is contained in:
Delyan Angelov 2020-06-28 14:27:53 +03:00
parent fa867578bc
commit 9814497b91

View File

@ -47,9 +47,8 @@ fn (mut p Parser) sql_expr() ast.Expr {
p.check_name() // `limit`
if p.tok.kind == .number && p.tok.lit == '1' {
query_one = true
} else {
has_limit = true
}
has_limit = true
limit_expr = p.expr(0)
}
if p.tok.kind == .name && p.tok.lit == 'offset' {