Skip to content

Conversation

@jordr
Copy link
Contributor

@jordr jordr commented Jan 7, 2023

Resolves #485 for _Pragma support.
After the preprocessing stage, some _Pragmas may remain. This at least lets us parse such code.

I'm not certain about the _token_coord(p, 2)) here though. Might be 3?
https://github.com/statinf-software/pycparser/blob/32b35034bf06d76af10054da8cc227b9e6dd75dd/pycparser/c_parser.py#L579-L580

(PS: I get ModuleNotFoundError: No module named '_ast_gen' when trying to run the tests, but I think the test additions still ran and passed.)

Copy link
Owner

@eliben eliben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you; please rebase this PR on top of the current master - it had a commit that should fix action failures on old Python versions

@jordr jordr force-pushed the feature/add-_Pragma-support branch from 32b3503 to 07c5454 Compare January 7, 2023 20:09
@jordr jordr force-pushed the feature/add-_Pragma-support branch from 08d6083 to 0fcd501 Compare January 8, 2023 02:00
@jordr
Copy link
Contributor Author

jordr commented Jan 8, 2023

Thanks for the help! Looks good to me now.

@eliben eliben merged commit 4e16079 into eliben:master Jan 8, 2023
@jordr jordr deleted the feature/add-_Pragma-support branch January 8, 2023 11:15
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

Successfully merging this pull request may close these issues.

_Pragma is not supported

2 participants