summaryrefslogtreecommitdiff
path: root/doc/concepts/expressions.org
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-05-30 12:38:36 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-05-30 15:58:27 +0200
commitf52a182afe3af442ecd8ecf441124a6489f831a3 (patch)
treed1bb0c0efaa375ac130b425b6750307721b42bf9 /doc/concepts/expressions.org
parent70eed826bc59d924cc3c43ae5f1bc19327493d22 (diff)
downloadjustbuild-f52a182afe3af442ecd8ecf441124a6489f831a3.tar.gz
Built-in expressions: add enumerate
Add a function transforming a list into a map. In this way, artifacts collected positionally in a list can easily be realized as a stage used for input to an action or output of a target.
Diffstat (limited to 'doc/concepts/expressions.org')
-rw-r--r--doc/concepts/expressions.org5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/concepts/expressions.org b/doc/concepts/expressions.org
index 50737413..895b5e0a 100644
--- a/doc/concepts/expressions.org
+++ b/doc/concepts/expressions.org
@@ -211,6 +211,11 @@ those) argument(s) to obtain the final result.
first non-negative integers. For example, ~{"type": "range",
"$1": "3"}~ evaluates to ~["0", "1", "2"]~.
+- ~"enumerate"~ The argument has to be a list. The result is a map
+ containing one entry for each element of the list; the key is the
+ decimal representation of the position in the list (starting from
+ ~0~) and the value is the element.
+
- ~"++"~ The argument has to be a list of lists. The result is the
concatenation of those lists.