From d4e2b6542548cd2b60815185aaf021d44dca1ff7 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 26 Jan 2023 20:15:30 -0500 Subject: More explicit documentation about roles in a few places --- docs/doc/namespace.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/doc/namespace.html') diff --git a/docs/doc/namespace.html b/docs/doc/namespace.html index 8c4760af..87663860 100644 --- a/docs/doc/namespace.html +++ b/docs/doc/namespace.html @@ -37,7 +37,7 @@ {n7}.n -

The part on the left can be anything with a subject role, although it will often need to be parenthesized because . has higher precedence than any operator. This allows it to be chained like a.b.c if a namespace has a value that is also a namespace (and so on).

+

The part on the left can be anything with a subject role, although it will often need to be parenthesized because . has higher precedence than any operator. So it can be chained like a.b.c if a field has a value that is also a namespace (and so on). The overall role is determined by the last name: for example •math.Sin has a function role.

Second, a namespace might be used in a destructuring assignment like the one below. This assignment's target looks like a list, where each entry specifies one of the names exported by the block and what it should be assigned to. The element can be either a single name, like b, which gives both, or an aliasing expression like b2b. In this case, the value b from the namespace is used, but it's given the name b2 instead of b. Imported names can be repeated—but the variable names defined can't be—and all the names can be spelled with any role (the role is ignored).

aliasa, b, c0c1c, b2b  example
 
-- cgit v1.2.3