Closed shevek closed 10 years ago
Could you elaborate why you propose this change?
To be able to retrieve the source file of a token, especially when the header files are included. You can handle handleSourceChange(Source, String) in PreprocessorListener and keep track of source file changes. To do that getPath() method must be public.
The trouble is, getPath() isn't exactly canonical. It was only originally intended to be used for #line markers, and I don't think it's actually well-defined.
So I need to audit it and make sure it's well-defined always before making this change.
OK, I needed this too. I see all your points. Fixed.
https://github.com/grzegorz8/jcpp/commit/155b634edbc916a0c3a1a501634e915fd65505e0