Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AstSemantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ a value and may appear as children of other expressions.

* `nop`: an empty operator that does not yield a value
* `block`: a fixed-length sequence of expressions with a label at the end
* `loop`: a block with an additional label at the beginning which may be used to form loops
* `loop`: a fixed-length sequence of expressions with a label at the beginning
* `if`: if expression with a list of *then* expressions and a list of *else* expressions
* `br`: branch to a given label in an enclosing construct
* `br_if`: conditionally branch to a given label in an enclosing construct
Expand Down Expand Up @@ -288,7 +288,7 @@ The `nop`, `br`, `br_if`, `br_table`, and `return` constructs do not yield value
Other control constructs may yield values if their subexpressions yield values:

* `block`: yields either the value of the last expression in the block or the result of an inner branch that targeted the label of the block
* `loop`: yields either the value of the last expression in the loop or the result of an inner branch that targeted the end label of the loop
* `loop`: yields the value of the last expression in the loop
* `if`: yields either the value of the last *then* expression or the last *else* expression or the result of an inner branch that targeted the label of one of these.

In all constructs containing block-like sequences of expressions, all expressions but the last must not yield a value.
Expand Down