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

pull/5570/head
Delyan Angelov 2020-06-28 14:27:53 +03:00
parent fa867578bc
commit 9814497b91
1 changed files with 1 additions and 2 deletions

View File

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