diff options
Diffstat (limited to 'doc/manual/src/language/operators.md')
-rw-r--r-- | doc/manual/src/language/operators.md | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/doc/manual/src/language/operators.md b/doc/manual/src/language/operators.md index a07d976ad..f8382ae19 100644 --- a/doc/manual/src/language/operators.md +++ b/doc/manual/src/language/operators.md @@ -35,17 +35,14 @@ ## Attribute selection -Select the attribute denoted by attribute path *attrpath* from [attribute set] *attrset*. -If the attribute doesn’t exist, return *value* if provided, otherwise abort evaluation. +> *attrset* `.` *attrpath* \[ `or` *expr* \] -<!-- FIXME: the following should to into its own language syntax section, but that needs more work to fit in well --> +Select the attribute denoted by attribute path *attrpath* from [attribute set] *attrset*. +If the attribute doesn’t exist, return the *expr* after `or` if provided, otherwise abort evaluation. -An attribute path is a dot-separated list of attribute names. -An attribute name can be an identifier or a string. +An attribute path is a dot-separated list of [attribute names](./values.md#attribute-set). -> *attrpath* = *name* [ `.` *name* ]... \ -> *name* = *identifier* | *string* \ -> *identifier* ~ `[a-zA-Z_][a-zA-Z0-9_'-]*` +> *attrpath* = *name* [ `.` *name* ]... [Attribute selection]: #attribute-selection |