From d587b6a25f9976abad9bf4b7039dd0c1f31b2913 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sun, 2 Apr 2017 15:05:04 +0200 Subject: language addition: colon-block for expressions in let/var context --- web/news/e031_version_0_16_2.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'web') diff --git a/web/news/e031_version_0_16_2.rst b/web/news/e031_version_0_16_2.rst index 809910052..4c4cac129 100644 --- a/web/news/e031_version_0_16_2.rst +++ b/web/news/e031_version_0_16_2.rst @@ -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 `_. +- 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 -- cgit 1.4.1-2-gfad0