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

Feature/add pragma support #487

Merged
merged 3 commits into from
Jan 8, 2023

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

pycparser/c_parser.py Show resolved Hide resolved
@jordr jordr force-pushed the feature/add-_Pragma-support branch from 32b3503 to 07c5454 Compare January 7, 2023 20:09
pycparser/c_parser.py Show resolved Hide resolved
@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