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

pull/8989/head
yuyi 2021-02-26 15:21:58 +08:00 committed by GitHub
parent 89c82ff8e2
commit 524372d49c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

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 {