[nem-en] Marcos and intelligence
Павел Блудов
pbludov at gmail.com
Sun Oct 22 09:23:45 CEST 2006
Hello guys!
I'm trying to implement code navigation for visual studio plugin. And I've
stuck in a problem. For this sample code
[code]
using System.Console;
using Nemerle.IO;
public m1() : void { printf("Hi!"); }
public m2() : void { Write("Hi!"); }
[/code]
the compiler produces exactly the same expression tree for both methods -
Nemerle.Compiler.Typedtree.TExpr.Call to System.Console.Write.
The supercompiler does not place macros in the expression tree, it places
the result of the macro here. Just like the preprocessor of an ancient
language does ;)
But there is no clue which can tell me that the call to System.Console.Write
was actually call to Nemerle.IO.printf. So, if an user hits F1 on something
like
[code]
printf("Hi!");
[/code]
he or she will get help on System.Console.Write instead of
Nemerle.IO.printf.
Is there a way to distinguish between macro-generated expressions and the
real ones?
More information about the devel-en
mailing list