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

Parsing of expression failed #788

Closed
pitrou opened this issue Jan 24, 2022 · 3 comments
Closed

Parsing of expression failed #788

pitrou opened this issue Jan 24, 2022 · 3 comments
Labels
upstream Issue in external software

Comments

@pitrou
Copy link

pitrou commented Jan 24, 2022

When building the Apache Arrow docs, we get this warning:

/home/antoine/arrow/dev/docs/source/cpp/api/dataset.rst:62: WARNING: Parsing of expression failed. Using fallback parser. Error was:
Error in postfix expression, expected primary expression or type.
If primary expression:
  Invalid C++ declaration: Expected identifier in nested name. [error at 59]
    std::function< Status(FileWriter *)> writer_pre_finish   = [](FileWriter*) {returnStatus::OK();}
    -----------------------------------------------------------^
If type:
  Invalid C++ declaration: Expected identifier in nested name. [error at 59]
    std::function< Status(FileWriter *)> writer_pre_finish   = [](FileWriter*) {returnStatus::OK();}
    -----------------------------------------------------------^

Admittedly, C++ is hard to parse, so not necessarily expecting this to pass :-) Still, the warning is a bit distracting.

@jakobandersen
Copy link
Collaborator

Right, this is not a problem Breathe can solve, but is for Sphinx.
As you may have guessed, the problem is that parsing of lambda expressions has not been implemented yet, as that basically means all of C++ can be encountered.
Note that the rendering of the declaration should still be fine, except for the lambda expression being without styling.
Please open an issue over at Sphinx, then I'll progress on in when time allows. If you have other examples of such lambda expressions that are not being parsed, please list them as well. Then I'll prioritise the statement types that you need.

@pitrou
Copy link
Author

pitrou commented Jan 31, 2022

To be honest, we probably don't care whether the lambda expression is properly syntax-highlighted or not. What's mostly annoying is the warning itself :-)

@pitrou
Copy link
Author

pitrou commented Jan 31, 2022

Sphinx issue open at sphinx-doc/sphinx#10152

@vermeeren vermeeren added the upstream Issue in external software label Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Issue in external software
Projects
None yet
Development

No branches or pull requests

3 participants