Community
Participate
Working Groups
Similar as we provide include-directives for inactive code, we should also provide the comments for inactive code. If we don't do that the comments from the AST cannot be used for generating task tags. Example: #ifdef XXX // todo implementation for XXX #endif
Is someone working on this? Otherwise I could take a look.
(In reply to comment #1) > Is someone working on this? Otherwise I could take a look. Great, it's yours.
Thanks :)
BTW, I already have this working for the C99 parser. It was fairly easy to do since the lexer and preprocessor are separated. The lexer generates comment tokens, then the preprocessor filters and collects them. The tokens are later converted into comment nodes. There are two options; generate comment nodes for all comments, and generate comment nodes only for active code.
I'll add this two option to my code. I think it would be best to define these options for all languages for example in AbstractLanguage?
Created attachment 65198 [details] patch Okay, changing the API is maybe not the best idea at this point in time. So I decided just to add the comments from inactive code.
Thanks Emanuel, I have applied the patch and enabled the testcase for the bug.