-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any tutorials on this project? #31
Comments
And the Preprocessor seemed to keep comments by default, and can not be disabled! |
CppReader behaves as a Java Reader. Preprocessor has its own lexer-like API if you want to use it directly. Keeping comments can be enabled or disabled using Feature.KEEPCOMMENTS or Feature.KEEPALLCOMMENTS. Overall documentation is available here: https://shevek.github.io/jcpp/docs/javadoc/ |
If I use Preprocessor directly, Feature.KEEPCOMMENTS or Feature.KEEPALLCOMMENTS will not take effect and pp.token() willl always keep comments. In order to disable comments, I have to use LexerSource or CppReader. |
Please don't reuse issues for new questions. A minimal code sample would be great so reproduce your bug report. |
Re: KEEPCOMMENTS: I didn't check again, but that's probably true, but it's fairly easy to filter the returned token stream by type yourself. Filtering comments within the API is only really important if you don't have access to the token stream (and hence types), as in CppReader. I don't think LexerSource has anything to do with comments. |
There is no wiki either.
The text was updated successfully, but these errors were encountered: