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

[PARSE BUG]: Cannot parse free conversion operator #94

Open
ostr00000 opened this issue Jan 12, 2024 · 0 comments · May be fixed by #95
Open

[PARSE BUG]: Cannot parse free conversion operator #94

ostr00000 opened this issue Jan 12, 2024 · 0 comments · May be fixed by #95
Labels
bug Something isn't working

Comments

@ostr00000
Copy link

Problem description

I think the code is correct and should be parsed by cxxheaderparser. But running this code fail with error:
:8: parse error evaluating 'operator': unexpected 'operator', expected 'NAME'


Looking at test for operators, it seems that there are tests for conversion_operators and free_operator, but there are no tests for free_conversion_operators, so this probably has never been implemented.

I can implement this and make PR.

C++ code that can't be parsed correctly (please double-check that https://robotpy.github.io/cxxheaderparser/ has the same error)

class Bar{};

class Foo{
    public:
    operator Bar();
};

Foo::operator Bar() { return Bar(); }
@ostr00000 ostr00000 linked a pull request Jan 12, 2024 that will close this issue
@virtuald virtuald added the bug Something isn't working label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants