diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-04-22 14:33:31 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-04-24 12:30:09 +0200 |
commit | 199487b5ba387653bbec36d6dcea85819c90994c (patch) | |
tree | 6cf3a49c21f3417a25c78655e12c599fb3bc806c /doc/concepts/expressions.md | |
parent | a61f044171247baaca7cc08283231f64eaf09e88 (diff) | |
download | justbuild-199487b5ba387653bbec36d6dcea85819c90994c.tar.gz |
expressions: add generic assertions
Diffstat (limited to 'doc/concepts/expressions.md')
-rw-r--r-- | doc/concepts/expressions.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/concepts/expressions.md b/doc/concepts/expressions.md index 25da0fc8..80378191 100644 --- a/doc/concepts/expressions.md +++ b/doc/concepts/expressions.md @@ -391,3 +391,12 @@ that evaluation included in the error message presented to the user. two (or more) maps contain the same key, but map it to different values. It is also an error if the argument is a name-containing value. + + - `"assert"` Evaluate the argument (given by the parameter `"$1"`); + then evaluate the expression `"predicate"` with the variable given + at the key `"var"` (which has to be a string literal if given, + default value is `"_"`) bound to that value. If the predicate + evaluates to a true value, return the result of evaluating the + argument, otherwise fail; in evaluating the failure message + `"msg"`, also keep the variable specified by `"var"` bound to + the result of evaluating the argument. |