[nem-en] yield,(un)checked macros
Dmitry Ivankov
divanorama at gmail.com
Sat Jun 23 18:01:45 CEST 2007
Following macros won't work:
macro MyYield (expr = null)
syntax ("MyYield", expr)
{
<[ yield $expr ]>
}
It fails to expand, because first it expands into "yield $expr", and then
immediately to hacky dont_use_me, without being intercepted by Typer.
This case can be fixed by creating non-recursive
MacroRegistry.expand_single_macro and fixing Typer.TypeExpr call to
expand_macro.
But expand_macro is also used in PrettyPrint.SprintExpr and
Macros.TraverseExpr, how should these methods interact with
yield,checked,unchecked macros?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman/pipermail/devel-en/attachments/20070623/0f7843bd/attachment.html
More information about the devel-en
mailing list