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

parser: fix incorrect comments of expr() (#8979)

This commit is contained in:
yuyi
2021-02-26 15:21:58 +08:00
committed by GitHub
parent 89c82ff8e2
commit 524372d49c

View File

@ -76,10 +76,11 @@ pub fn (mut p Parser) expr(precedence int) ast.Expr {
p.next()
}
.amp, .mul, .not, .bit_not, .arrow {
// -1, -a, !x, &x, ~x, <-a
// &x, *x, !x, ~x, <-x
node = p.prefix_expr()
}
.minus {
// -1, -a
if p.peek_tok.kind == .number {
node = p.parse_number_literal()
} else {