Allow if-expressions and switch-expressions in Engine::eval_expression.

This commit is contained in:
Stephen Chung
2022-08-26 23:10:58 +08:00
parent 204284f4f7
commit d80184ba14
3 changed files with 80 additions and 6 deletions

View File

@@ -23,6 +23,11 @@ New features
* For very special needs, the ability to register fallible type iterators is added.
### Expressions
* `if`-expressions are allowed in `Engine::eval_expression` and `Engine::compile_expression` provided that both statement blocks each contain at most a single expression.
* `switch`-expressions are allowed in `Engine::eval_expression` and `Engine::compile_expression` provided that match actions are expressions only.
Enhancements
------------