Comments (5)
And the Preprocessor seemed to keep comments by default, and can not be disabled!
from jcpp.
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/
from jcpp.
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.
from jcpp.
Please don't reuse issues for new questions. A minimal code sample would be great so reproduce your bug report.
from jcpp.
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.
from jcpp.
Related Issues (20)
- NullPointerException when #endif is missing HOT 2
- 0x is not a legal hex constant
- Handle framework includes properly HOT 3
- Absolute paths in includes HOT 11
- Empty variadic arguments HOT 1
- ``, ## VA_ARGS'' should remove the comma, if the variadic argument is empty. HOT 5
- Whitespace used in token pasting HOT 5
- pragma() should use source_token() not token()
- Re-check multiline comment whitespace preservation HOT 1
- Line number mismatch after pop_source() HOT 1
- Fix unit test suite on windows
- Stripping line comments HOT 1
- Support extension of preprocessor HOT 1
- ClassCastException with character constants in expressions HOT 1
- Please publish module names HOT 2
- skip empty LN with # instead of filling LN HOT 1
- Unable to run Main class via Gradle
- Link to coverage report on README.md is broken
- Main doesn't return nonzero exit code on failure. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jcpp.