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

Error parsing default member value #453

Open
pitrou opened this issue Sep 25, 2019 · 3 comments
Open

Error parsing default member value #453

pitrou opened this issue Sep 25, 2019 · 3 comments

Comments

@pitrou
Copy link

pitrou commented Sep 25, 2019

I have the following struct member:

struct ParseOptions {
  /// Escaping character (if `escaping` is true)
  char escape_char = '\\';
};

which when parsed and rendered by breathe / Sphinx gives the following error:

/home/antoine/arrow/dev/docs/source/cpp/api/formats.rst:28: WARNING: Parsing of expression failed. Using fallback parser. Error was:
Error in postfix expression, expected primary expression or type.
If primary expression:
  Invalid definition: Expected identifier in nested name. [error at 45]
    char arrow::csv::ParseOptions::escape_char = '\'
    ---------------------------------------------^
If type:
  Invalid definition: Expected identifier in nested name. [error at 45]
    char arrow::csv::ParseOptions::escape_char = '\'
    ---------------------------------------------^
@pitrou
Copy link
Author

pitrou commented Sep 25, 2019

Amusingly, the HTML is still emitted correctly.

@jakobandersen
Copy link
Collaborator

I'm almost certain this is due to the same problem as in sphinx-doc/sphinx#6462.
It is however nice to hear that the parser fallback works as intended. (If the expression is more complex you can potentially have identifiers that will not be hyperlinked due to the fallback.)

@jakobandersen
Copy link
Collaborator

This should be fixed in Sphinx 3.

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

No branches or pull requests

2 participants