Commit 55ba20ec authored by Russ Cox's avatar Russ Cox

parse expression statements beginning with

arithmetic unary operators + - ^

R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=34338
CL=34350
parent dcb1c5f5
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment