mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
- get rid of Designator terminology
SVN=111696
This commit is contained in:
parent
1cf631b4c7
commit
e6626dafa8
@ -1137,13 +1137,14 @@ Assignments
|
|||||||
----
|
----
|
||||||
|
|
||||||
Assignment = SingleAssignment | TupleAssignment | Send .
|
Assignment = SingleAssignment | TupleAssignment | Send .
|
||||||
SimpleAssignment = Designator assign_op Expression .
|
SingleAssignment = PrimaryExpr assign_op Expression .
|
||||||
TupleAssignment = DesignatorList assign_op ExpressionList .
|
TupleAssignment = PrimaryExprList assign_op ExpressionList .
|
||||||
|
PrimaryExprList = PrimaryExpr { "," PrimaryExpr } .
|
||||||
Send = '>' Expression '=' Expression .
|
Send = '>' Expression '=' Expression .
|
||||||
|
|
||||||
assign_op = [ add_op | mul_op ] '=' .
|
assign_op = [ add_op | mul_op ] '=' .
|
||||||
|
|
||||||
The designator must be an l-value such as a variable, pointer indirection,
|
The left-hand side must be an l-value such as a variable, pointer indirection,
|
||||||
or an array indexing.
|
or an array indexing.
|
||||||
|
|
||||||
x = 1
|
x = 1
|
||||||
@ -1189,7 +1190,7 @@ must denote a channel pointer value.
|
|||||||
|
|
||||||
>chan_ptr = value
|
>chan_ptr = value
|
||||||
|
|
||||||
In assignments, the type of the expression must match the type of the designator.
|
In assignments, the type of the expression must match the type of the left-hand side.
|
||||||
|
|
||||||
|
|
||||||
Go statements
|
Go statements
|
||||||
|
Loading…
x
Reference in New Issue
Block a user