aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Syntax.md
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2019-12-03 23:34:47 -0500
committerXavier Claessens <xclaesse@gmail.com>2019-12-04 16:45:56 -0500
commit9b1a85747334e3e1c21e9a27f4aa79f7f44c1f2d (patch)
tree07868682f01264aad85710ee28fa19a9f711c37a /docs/markdown/Syntax.md
parentb1c8f765fa6e2af0d185d2a20dc68c7567c916eb (diff)
downloadmeson-9b1a85747334e3e1c21e9a27f4aa79f7f44c1f2d.zip
meson-9b1a85747334e3e1c21e9a27f4aa79f7f44c1f2d.tar.gz
meson-9b1a85747334e3e1c21e9a27f4aa79f7f44c1f2d.tar.bz2
dict: Fully evaluate keys
The only restriction is keys must be string after evaluation. This fix various inconsistencies.
Diffstat (limited to 'docs/markdown/Syntax.md')
-rw-r--r--docs/markdown/Syntax.md12
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index b96e6e1..cf0516c 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -324,8 +324,8 @@ Dictionaries
--
Dictionaries are delimited by curly braces. A dictionary can contain an
-arbitrary number of key value pairs. Keys are required to be literal
-strings, values can be objects of any type.
+arbitrary number of key value pairs. Keys are required to be strings, values can
+be objects of any type. Prior to *0.53.0* keys were required to be literal strings.
```meson
my_dict = {'foo': 42, 'bar': 'baz'}
@@ -359,6 +359,14 @@ if 'foo' not in my_dict
endif
```
+*Since 0.53.0* Keys can be any expression evaluating to a string value, not limited
+to string literals any more.
+```meson
+d = {'a' + 'b' : 42}
+k = 'cd'
+d += {k : 43}
+```
+
Function calls
--