[nem-en] yield,(un)checked macros
Kamil Skalski
kamil.skalski at gmail.com
Sun Jun 24 09:21:28 CEST 2007
I think that we should actually use some nicer pattern than those
hacky "intercepted macros" - maybe it should be additional node in
TExpr or reusing some existing one with indicator that node "special".
Otherwise the recursive expansion would need to be indeed moved to
Typer.TypeExpr, but I think rest of expand_macro uses should stay as
they are.
2007/6/23, Dmitry Ivankov <divanorama at gmail.com>:
> 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?
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list