[svn] r6445: nemerle/trunk/macros/core.n
VladD2
svnadmin at nemerle.org
Wed Jul 12 07:24:11 CEST 2006
Log:
Has add ExprToString() macro.
Author: VladD2
Date: Wed Jul 12 07:24:09 2006
New Revision: 6445
Modified:
nemerle/trunk/macros/core.n
Modified: nemerle/trunk/macros/core.n
==============================================================================
--- nemerle/trunk/macros/core.n (original)
+++ nemerle/trunk/macros/core.n Wed Jul 12 07:24:09 2006
@@ -751,6 +751,13 @@
PrettyPrint.PrintExpr (ctx, exp);
<[ () ]>
}
+
+ macro ExprToString (exp, expandMacros : bool)
+ {
+ def ctx = if (expandMacros) Some (Macros.ImplicitCTX()) else None ();
+ def str = PrettyPrint.SprintExpr (ctx, exp);
+ <[ $(str : string) ]>
+ }
}
namespace Nemerle.Extensions {
More information about the svn
mailing list