Files
Nim/compiler
Adam Strzelecki 13b57dbc2f Introduce {.noRewrite.} expr pragma disabling TR
Term rewriting macros/templates are currently greedy and they will rewrite as
long as there is a match. So there was no way to ensure some rewrite happens
only once, eg. when rewriting term to same term plus extra content.

With new macro we can actually prevent further rewriting on marked expr or
stmts, eg. with given example echo(...) will be rewritten just once:

  template pwnEcho{echo(x)}(x: expr) =
    {.noRewrite.}: echo("pwned!")

  echo "ab"
2015-06-02 21:38:53 +02:00
..
2015-04-07 15:47:18 +02:00
2014-08-28 09:38:14 +02:00
2015-05-03 01:08:51 +02:00
2015-04-07 15:47:18 +02:00
2015-04-27 23:11:59 +02:00
2015-04-07 15:47:18 +02:00
2015-04-28 20:21:53 +02:00
2015-04-07 15:47:18 +02:00
2014-11-03 22:50:55 +01:00
2015-04-23 23:49:10 +02:00
2014-08-28 09:38:14 +02:00
2015-04-07 15:47:18 +02:00
2014-08-28 09:38:14 +02:00
2014-08-28 09:38:14 +02:00
2015-02-16 02:56:40 +01:00
2015-04-28 15:01:05 +02:00
2014-08-28 09:38:14 +02:00
2015-01-27 01:36:19 +01:00
2014-08-28 09:38:14 +02:00
2015-05-26 15:46:57 +03:00
2015-05-26 16:00:48 +03:00
2015-04-07 15:47:18 +02:00
2014-08-28 09:38:14 +02:00
2014-09-21 18:39:00 +02:00
2015-05-17 16:10:46 +02:00
2015-04-24 12:44:14 +02:00
2015-05-17 16:10:46 +02:00
2015-03-10 12:32:48 +01:00
2015-02-15 16:20:32 +00:00
2015-01-12 23:04:53 +01:00
2014-08-28 09:38:14 +02:00
2015-01-06 15:26:33 +01:00
2015-05-17 16:10:46 +02:00
2015-04-22 20:33:06 +02:00
2015-04-24 12:36:41 +02:00
2014-08-28 09:38:14 +02:00
2014-08-28 09:38:14 +02:00
2014-10-29 18:57:03 -04:00
2014-08-28 09:38:14 +02:00
2015-05-28 10:23:09 +03:00
2015-04-07 15:47:18 +02:00
2014-08-28 09:38:14 +02:00
2015-04-01 22:32:15 +08:00
2014-08-28 09:38:14 +02:00
2015-04-28 20:21:53 +02:00
2015-04-06 23:21:52 +02:00
2015-04-22 20:25:11 +02:00
2015-02-20 20:01:25 +01:00
2015-04-28 20:21:53 +02:00
2015-04-26 22:44:05 +02:00
2015-04-28 15:01:05 +02:00
2015-04-26 22:44:06 +02:00
2014-08-28 09:38:14 +02:00
2015-04-20 11:36:13 +02:00
2015-05-18 21:34:26 +02:00
2015-01-06 15:26:33 +01:00

This directory contains the Nim compiler written in Nim. Note that this
code has been translated from a bootstrapping version written in Pascal, so
the code is **not** a poster child of good Nim code.