Adam Strzelecki
4674b3eb80
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-07 13:14:52 +02:00
..
2015-04-25 12:07:35 -06:00
2015-05-24 17:47:51 -05:00
2015-04-24 02:08:06 +02:00
2014-08-28 23:48:42 +02:00
2015-06-07 13:14:52 +02:00
2015-06-04 13:15:07 +02:00
2014-08-28 09:38:14 +02:00
2015-04-01 22:32:15 +08:00
2015-04-13 23:49:41 +03: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-07 15:47:18 +02:00
2015-04-28 20:21:53 +02:00
2015-04-25 23:16:57 +02:00
2015-05-07 22:31:45 +02:00
2015-04-07 15:47:18 +02:00
2014-11-03 22:50:55 +01:00
2015-05-14 12:52:43 -07: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
2015-06-04 13:15:07 +02:00
2015-03-07 15:43:36 +01:00
2015-05-08 02:08:32 +02:00
2015-03-04 03:30:43 +01: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-06-04 13:15:07 +02:00
2014-08-28 09:38:14 +02:00
2015-03-22 09:31:15 +01:00
2015-05-26 15:46:57 +03:00
2015-06-04 12:00:27 +03:00
2015-04-07 15:47:18 +02:00
2015-06-07 13:14:10 +02:00
2015-06-04 13:15:07 +02:00
2014-08-28 09:38:14 +02:00
2015-03-01 00:16:46 +01:00
2015-04-05 15:46:56 +01:00
2015-04-24 02:08:06 +02:00
2014-09-21 18:39:00 +02:00
2015-05-16 12:38:53 +02:00
2015-05-17 16:10:46 +02:00
2015-05-31 02:55:06 +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-02-07 18:11:00 +01:00
2015-01-12 23:04:53 +01:00
2015-03-04 03:30:43 +01:00
2014-08-28 09:38:14 +02:00
2015-01-28 14:58:31 +00: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
2015-05-16 12:38:53 +02:00
2015-06-07 13:14:52 +02:00
2014-08-28 09:38:14 +02:00
2015-03-21 20:38:27 +01:00
2015-04-22 12:04:11 +02:00
2015-06-07 13:14:52 +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
2015-04-08 23:30:03 +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-03-28 00:15:04 +01:00
2015-04-22 20:25:11 +02:00
2015-03-28 00:15:04 +01:00
2015-05-03 01:08:52 +02:00
2015-02-20 20:01:25 +01:00
2015-05-03 01:08:52 +02:00
2015-03-06 12:20:15 +13:00
2015-04-28 20:21:53 +02:00
2015-04-26 22:44:05 +02:00
2015-04-24 02:08:06 +02:00
2015-03-14 01:26:32 +01:00
2015-04-28 15:01:05 +02:00
2015-06-07 13:14:52 +02:00
2015-04-04 01:19:31 +02:00
2015-04-26 22:44:06 +02:00
2015-04-20 21:25:49 +02:00
2015-02-22 23:23:22 +01:00
2015-05-13 19:10:54 +02:00
2015-05-13 18:34:29 +05:00
2015-01-29 03:08:41 +01:00
2014-08-28 09:38:14 +02:00
2014-08-11 20:38:28 +02:00
2015-05-03 01:08:50 +02:00
2015-04-20 11:36:13 +02:00
2015-06-04 13:15:07 +02:00
2015-04-29 22:24:50 +02:00
2015-03-06 12:20:15 +13:00
2015-05-18 21:34:26 +02:00
2015-04-25 23:17:00 +02:00
2015-04-13 14:57:23 -05:00
2015-04-25 23:17:00 +02:00
2015-01-06 15:26:33 +01:00
2015-04-25 23:17:00 +02:00
2015-04-24 02:08:06 +02:00
2015-06-07 13:14:52 +02:00