summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-04-06 11:26:53 +0200
committerXavier Claessens <xclaesse@gmail.com>2021-04-06 08:15:03 -0400
commit974e49fe0e18dccd479656203f9d9a1b1ec7e6c4 (patch)
tree9ba900166b54b94d177e5ec85baeab2d9470f79f
parent016feca6ddd22c92f2d8b7e1e9d628ccbfc012cd (diff)
downloadmeson-974e49fe0e18dccd479656203f9d9a1b1ec7e6c4.tar.gz
docs: document bool to_int and to_string methods
This documents the bool methods to_int and to_string implemented in [1]. [1]: https://github.com/mesonbuild/meson/blob/a9e9b7c7501a3c8a5984a93879d1f309bf8c72aa/mesonbuild/interpreterbase.py#L1109
-rw-r--r--docs/markdown/Syntax.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index 9ed32275e..4e3d422d5 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -93,6 +93,14 @@ A boolean is either `true` or `false`.
truth = true
```
+Booleans can be converted to a string or to a number:
+
+```meson
+bool_var = true
+string_var = bool_var.to_string()
+int_var = bool_var.to_int()
+```
+
## Strings
Strings in Meson are declared with single quotes. To enter a literal