Skip to content
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

Macros in code are causing parser errors. #40

Open
biojppm opened this issue Nov 18, 2020 · 6 comments
Open

Macros in code are causing parser errors. #40

biojppm opened this issue Nov 18, 2020 · 6 comments

Comments

@biojppm
Copy link

biojppm commented Nov 18, 2020

In this file I use some macros to hide SFINAE ugliness. This then has a big impact in the generated documentation; for example, it says the code provides memcpy().

@erez-o
Copy link
Owner

erez-o commented Nov 19, 2020

tl;dr start with changing the configuration from MACRO_EXPANSION: 'NO' to MACRO_EXPANSION: 'YES'

Longer answer:
docsforge uses Doxygen's output.
There are multiple configuration options in doxygen to handle such cases.
Please read doxygen preprocessor and the following comments from stackoverflow

docsforge has a current bug that makes your specific project a bit difficult to experiment with. It will be fixed and released in a few days, so I suggest you install doxygen and do a bit of testing with doxygen preprocessor commands in your local pc.

@erez-o
Copy link
Owner

erez-o commented Nov 19, 2020

Added a related feature request to my TODO list.

@biojppm
Copy link
Author

biojppm commented Nov 21, 2020

Thanks for clarifying. I left some notes on #43 regarding how easy or hard it is to iterate the documentation. Otherwise, this is not a bug on Docsforge, so I'm closing. Thanks for the links; I'll try to find a way to work around this.

@biojppm biojppm closed this as completed Nov 21, 2020
@erez-o
Copy link
Owner

erez-o commented Nov 22, 2020

The bug was fixed.
You can iterate online without needing to install doxygen.
Simply edit configurations parameters (like MACRO_EXPANSION) directly at https://c4core.docsforge.com/versions/ and rebuild docs until you're satisifed with the outcome. When you're satisfied, it's best you save the resulting configuration file in your repo.

@biojppm
Copy link
Author

biojppm commented Nov 24, 2020

@erez-o Thanks for the notes.

I am wondering whether the Doxygen step is using its clang parser. I guess not. Would it be hard to setup? For template-heavy and macro-heavy code, the Doxygen parser is just dumb, and clang would solve a lot of headaches in the future. I'm reopening the bug as I'm really interested in fixing the documentation errors without having to remove macros.

@biojppm biojppm reopened this Nov 24, 2020
@erez-o
Copy link
Owner

erez-o commented Nov 25, 2020

Currently it doesn't, it's not hard to setup, I can have it ready in a few days.

I would like to test it in my development setup. I haven't seen any doxygen cfg file for c4core. Can you please create a working cfg that uses doxygen's preprocessor and another that uses clang (with CLANG_ASSISTED_PARSING, CLANG_OPTIONS, CLANG_DATABASE_PATH values filled)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants