Skip to content

Commit 8458c78

Browse files
committed
Explicitly list which exprs for shared eval order PR
1 parent 02315d3 commit 8458c78

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/expressions.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,29 @@ in the order given by their associativity.
8686

8787
## Evaluation order of operands
8888

89-
Unless otherwise stated on the expression's page, evaluation of the operands of
90-
an expression is done before applying the effect of the expression. The operands
91-
are executed left to right as written in the source code.
89+
The following list of expressions all evaluate their operands the same way, as
90+
described after the list. Other expressions either don't take operands or
91+
evaluate them conditionally as described on their respective pages.
92+
93+
* Operator expressions (except the Lazy boolean operators)
94+
* Grouped expression
95+
* Array expression
96+
* Await expression
97+
* Index expression
98+
* Tuple expression
99+
* Tuple index expression
100+
* Struct expression
101+
* Enumeration variant expression
102+
* Call expression
103+
* Method call expression
104+
* Field expression
105+
* Break expression
106+
* Range expression
107+
* Return expression
108+
109+
The operands of these expressions are evaluated prior to applying the effects of
110+
the expression. Expressions taking multiple operands are evaluated left to right
111+
as written in the source code.
92112

93113
> **Note**: Which subexpressions are the operands of an expression is
94114
> determined by expression precedence as per the previous section.

0 commit comments

Comments
 (0)