From 4dd4d74794426a745730f76e490e21937d8f9609 Mon Sep 17 00:00:00 2001 From: nefelitav Date: Wed, 19 Jun 2024 16:58:04 +0200 Subject: [PATCH] clarify when each field selector is used --- src/expressions.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/expressions.rst b/src/expressions.rst index fa916e55..cc04a5f1 100644 --- a/src/expressions.rst +++ b/src/expressions.rst @@ -3504,6 +3504,17 @@ A :t:`container operand` is an :t:`operand` that indicates the :t:`value` whose A :t:`field selector` is a :t:`construct` that selects the :t:`field` to be accessed in a :t:`field access expression`. +:dp:`fls_T0cediM0OQ2P` +A :t:`field selector` can be: + +* :dp:`fls_wmWAn6FjGcIO` + An :t:`indexed field selector`, used for :t:`[tuple]s`. Fields are accessed by their index, + starting from 0 and increasing sequentially. + +* :dp:`fls_1eI5ubKhJiaq` + A :t:`named field selector`, used for :t:`[struct]s` and :t:`[union]s`. + Fields are accessed by their name. + :dp:`fls_qqrconpa92i3` A :t:`selected field` is a :t:`field` that is selected by a :t:`field access expression`.