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

Verbose output #22

Closed
Dooez opened this issue Aug 23, 2023 · 2 comments
Closed

Verbose output #22

Dooez opened this issue Aug 23, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Dooez
Copy link

Dooez commented Aug 23, 2023

Having an option for verbose output could be helpful, for example outputting the line that caused the parse error.
I am encountering a lot of parse errors and would like to know if i can adjust my code to reduce them.

@lawmurray lawmurray added the enhancement New feature or request label Aug 25, 2023
@lawmurray
Copy link
Owner

Thanks for the suggestion @Dooez.

If it's useful in the meantime, most parse errors come from macro use, for example macros that define function attributes:

#define NOINLINE [[noinline]]

NOINLINE int f(int x);

Because Doxide (well, tree-sitter) does not run a preprocessor, this can look like a syntax error in the declaration of f. In my experience, despite the warnings, it is managing to extract the right entities and their documentation nonetheless.

@lawmurray
Copy link
Owner

@Dooez FYI the new v0.4.0 provides much more useful output on parse errors, including line and column numbers. For parse errors related to macro use, there is also new error recovery logic and the ability to define macros in the configuration file (see documentation).

I'll close the issue as completed now, but feel free to reply or reopen, or post any followup issues that you encounter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants