language addition: colon-block for expressions in let/var context

This commit is contained in:
Andreas Rumpf 2017-04-02 15:05:04 +02:00
commit d587b6a25f
3 changed files with 62 additions and 10 deletions

View file

@ -96,6 +96,19 @@ remove the need for the ``newException`` template.
- A new pragma ``.used`` can be used for symbols to prevent
the "declared but not used" warning. More details can be
found `here <http://nim-lang.org/docs/manual.html#pragmas-used-pragma>`_.
- The popular "colon block of statements" syntax is now also supported for
``let`` and ``var`` statements:
.. code-block:: nim
template ve(value, effect): untyped =
effect
val
let x = ve(4):
echo "welcome to Nim!"
This is particularly useful for DSLs that help in tree construction.
Bugfixes