From 974e49fe0e18dccd479656203f9d9a1b1ec7e6c4 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 6 Apr 2021 11:26:53 +0200 Subject: 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 --- docs/markdown/Syntax.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md index 9ed3227..4e3d422 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 -- cgit v1.1