Any way to get file/line for symbol declaration?
Mike Franklin
slavo5150 at yahoo.com
Mon Jun 10 01:58:37 UTC 2019
On Sunday, 9 June 2019 at 21:26:52 UTC, Manu wrote:
> I'd REALLY like to emit the error with the proper file and line
> prefix
> so that you can click and code editors will go to the problem
> declaration.
>
> I can't find any way to dig the Loc of the declaration from the
> symbol reference. Does anyone know any tricks? Should I make a
> PR to expose the symbol Loc as a traits?
This is actually a very good idea, IMO. I actually see a lot of
potential in the D's traits system for exposing more information
like this from the compiler to users' programs. I'd like to the
traits feature set judiciously expanded with such things. So
thumbs up from me.
Mike
More information about the Digitalmars-d
mailing list