mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: fix -5.str() precedence
This commit is contained in:
@ -220,7 +220,12 @@ fn (mut p Parser) prefix_expr() ast.PrefixExpr {
|
||||
// p.warn('unsafe')
|
||||
// }
|
||||
p.next()
|
||||
right := p.expr(token.Precedence.prefix)
|
||||
mut right := ast.Expr{}
|
||||
if op == .minus {
|
||||
right = p.expr(token.Precedence.call)
|
||||
} else {
|
||||
right = p.expr(token.Precedence.prefix)
|
||||
}
|
||||
p.is_amp = false
|
||||
return ast.PrefixExpr{
|
||||
op: op
|
||||
|
Reference in New Issue
Block a user