[nem-en] Re: compiler generated locations
Kamil Skalski
kamil.skalski at gmail.com
Tue Nov 21 20:09:11 CET 2006
Ok, I changed Location_stack.top() so it returns locations marked as
"generated" if Manager is InCompletionMode.
I'm pretty sure this will not very closely track the parsed /
generated distinction you need, but I hope this is a good starting
point. Could you try this and tell me if it is useful?
Probably we would need a better definition of "generated code", so we
can fix other places in compiler.
On 11/21/06, vc <vc at rsdn.ru> wrote:
> > But this requires changing Location into class and this appears to be
> > a real pain.. :(
> > I was playing with it some time, but I got many NullPointerExceptions
> > first from lexer then parser (where I stopped). It looks like we have
> > many places where location is not initialized at all and when we
> > change it from struct to class we get nulls.
>
> It's bad idea. It's be expressed in performance and memory penalty (each
> object is + 12 bytes).
> It is better using one bit in _fileIndex field.
>
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list