mirror of
https://github.com/golang/go
synced 2024-11-12 09:30:25 -07:00
parse expression statements beginning with
arithmetic unary operators + - ^ R=r DELTA=1 (0 added, 0 deleted, 1 changed) OCL=34338 CL=34350
This commit is contained in:
parent
dcb1c5f5d4
commit
55ba20ec2d
@ -1631,7 +1631,7 @@ func (p *parser) parseStmt() ast.Stmt {
|
||||
// tokens that may start a top-level expression
|
||||
token.IDENT, token.INT, token.FLOAT, token.CHAR, token.STRING, token.FUNC, token.LPAREN, // operand
|
||||
token.LBRACK, token.STRUCT, // composite type
|
||||
token.MUL, token.AND, token.ARROW: // unary operators
|
||||
token.MUL, token.AND, token.ARROW, token.ADD, token.SUB, token.XOR: // unary operators
|
||||
return p.parseSimpleStmt(true);
|
||||
case token.GO:
|
||||
return p.parseGoStmt();
|
||||
|
Loading…
Reference in New Issue
Block a user