Skip to content

Commit

Permalink
Update docs to reflect #5074 changes (#5082)
Browse files Browse the repository at this point in the history
  • Loading branch information
philrz authored Mar 22, 2024
1 parent 7740693 commit 1d79fb4
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions docs/language/statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ produces
```

One or more `const` statements may appear only at the beginning of a scope
(i.e., the main scope at the start of a Zed program or a [lateral scope](lateral-subqueries.md/#lateral-scope))
defined by an [`over` operator](operators/over.md)
(i.e., the main scope at the start of a Zed program,
the start of the body of a [user-defined operator](#operator-statements),
or a [lateral scope](lateral-subqueries.md/#lateral-scope)
defined by an [`over` operator](operators/over.md))
and binds the identifier to the value in the scope in which it appears in addition
to any contained scopes.

Expand Down Expand Up @@ -57,7 +59,9 @@ produces
```

One or more `func` statements may appear at the beginning of a scope
(i.e., the main scope at the start of a Zed program or a [lateral scope](lateral-subqueries.md#lateral-scope)
(i.e., the main scope at the start of a Zed program,
the start of the body of a [user-defined operator](#operator-statements),
or a [lateral scope](lateral-subqueries.md/#lateral-scope)
defined by an [`over` operator](operators/over.md))
and binds the identifier to the expression in the scope in which it appears in addition
to any contained scopes.
Expand Down Expand Up @@ -88,6 +92,14 @@ where `<id>` is the identifier of the user-defined operator and `<expr>` is a li
of [expressions](expressions.md) matching the number of `<param>`s defined in
the operator's signature.

One or more `op` statements may appear only at the beginning of a scope
(i.e., the main scope at the start of a Zed program,
the start of the body of a [user-defined operator](#operator-statements),
or a [lateral scope](lateral-subqueries.md/#lateral-scope)
defined by an [`over` operator](operators/over.md))
and binds the identifier to the value in the scope in which it appears in addition
to any contained scopes.

### Sequence `this` Value

The `this` value of a user-defined operator's sequence is provided by the
Expand Down Expand Up @@ -220,7 +232,9 @@ produces
```

One or more `type` statements may appear at the beginning of a scope
(i.e., the main scope at the start of a Zed program or a [lateral scope](lateral-subqueries.md#lateral-scope)
(i.e., the main scope at the start of a Zed program,
the start of the body of a [user-defined operator](#operator-statements),
or a [lateral scope](lateral-subqueries.md/#lateral-scope)
defined by an [`over` operator](operators/over.md))
and binds the identifier to the type in the scope in which it appears in addition
to any contained scopes.
Expand Down

0 comments on commit 1d79fb4

Please sign in to comment.