-
Notifications
You must be signed in to change notification settings - Fork 747
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
failed to parse function return function pointers #64
Comments
Looks like is_funcdef() in parse.c makes some incorrect assumptions so it tries to parse this as a decl. |
That's right. is_funcdef returns a wrong result for the input. Maybe we should stop making a guess before calling the parser but instead call the parser directly, because making a good guess is as hard as parsing input. |
The look ahead is good for readability. If we don't have the ability to save and reset the parser at choice points on an error, decl and function parsing may need to be combined into an ugly mess. |
It actually might not be too bad, I think it comes down to a check in read_decl like:
Edit: |
The text was updated successfully, but these errors were encountered: