[nem-en] Integration again

Kamil Skalski kamil.skalski at gmail.com
Fri Nov 17 18:55:24 CET 2006


>
> 2. Locations again. We need somehow to distinguish generated by macro
>    or compiler locations and real locations from source code. So, we
>    will be able to filter them and to implement some features more
>    precisely.

Hm, so the macro envelope is not enough? ;)
It might be a problem, since macros / compiler usually just copies
existing locations to new nodes. You might try to tweak uses of
'Util.locate' macro to assign some extra location values (somehow
distinguished from normal locations, I don't know, negative line
numbers? etc. ;) )

Another option to recognize macro / compiler generated code is to look
at "macro colors". They are stored in Parsetree.Name objects present
in e.g. PExpr.Ref and others. Every execution of macro increments the
'color' used to construct nodes. But as far as I remember whole
parsing is done with the same single macro color.
See method
    mkname (id : string) : Name {
      Name.NameInCurrentColor (id, env)
    }

in MainParser.n


>
>
> P.S. We are very close to release first version of the integration.
>      Right now, we are fixing bugs and we need your help to get the
>      compiler stable in completion mode.
>
>
> --
> Best regards,
> Igor
> mailto:it at rsdn.ru
>
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>


-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list