diff options
Diffstat (limited to 'web')
-rwxr-xr-x | web/index.txt | 4 | ||||
-rwxr-xr-x | web/news.txt | 3 | ||||
-rwxr-xr-x | web/snippets/snippet1.nim | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/web/index.txt b/web/index.txt index fd6a04242..c227c268a 100755 --- a/web/index.txt +++ b/web/index.txt @@ -19,7 +19,7 @@ Welcome to Nimrod .. code-block:: nimrod # Filter key=value pairs - import regexprs + import re for x in lines("myfile.txt"): if x =~ r"(\w+)=(.*)": @@ -70,7 +70,7 @@ Nimrod is expressive generics, etc. * User-defineable operators; code with new operators is often easier to read than code which overloads built-in operators. In the code snippet, the - ``=~`` operator is defined in the ``regexprs`` module. + ``=~`` operator is defined in the ``re`` module. * Macros can modify the abstract syntax tree at compile time. diff --git a/web/news.txt b/web/news.txt index 6ce9f7fcd..abe1c5e4d 100755 --- a/web/news.txt +++ b/web/news.txt @@ -24,6 +24,7 @@ Bugfixes - Fixed ``unicode.toUTF8``. - The compiler now rejects ``'\n'``. - ``times.getStartMilsecs()`` now works on Mac OS X. +- Fixed a bug in ``pegs.match`` concerning start offsets. Additions @@ -45,6 +46,7 @@ Additions - Added ``xmltree`` module. - Added ``xmlparser`` module. - Added ``htmlparser`` module. +- Added ``re`` module. - Many wrappers now do not contain redundant name prefixes (like ``GTK_``, ``lua``). The new wrappers are available in ``lib/newwrap``. Change your configuration file to use these. @@ -72,6 +74,7 @@ Changes affecting backwards compatibility named arguments only, because the parameter order will change the next version! - ``atomic`` and ``let`` are now keywords. +- The ``\w`` character class for pegs now includes the digits ``'0'..'9'``. 2009-12-21 Version 0.8.6 released diff --git a/web/snippets/snippet1.nim b/web/snippets/snippet1.nim index 05359a0e0..85cb98142 100755 --- a/web/snippets/snippet1.nim +++ b/web/snippets/snippet1.nim @@ -1,4 +1,4 @@ import strutils echo "Give a list of integers (separated by spaces): ", - stdin.readLine.splitSeq.each(parseInt).max, + stdin.readLine.split.each(parseInt).max, " is the maximum!" |