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

Provide public APIs to get parse tree/syntax errors #2592

Open
fabioz opened this Issue Sep 3, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@fabioz

fabioz commented Sep 3, 2018

This is a feature request to provide an API in cython which provides users a way of getting the parse tree (AST) as well as syntax errors for cython files.

Ideally it'd be a call where the contents are passed (to deal with working files) and a syntax error is raised or the generated AST is returned.

@scoder

This comment has been minimized.

Show comment
Hide comment
@scoder

scoder Sep 3, 2018

Contributor

Sounds good to me. PR welcome.

Look at the TreeFragment class. It's not designed as an external API, but it comes very close to what you want.

Getting syntax errors is easy, look at the Errors module and follow its usage, e.g. in the test runner.

Contributor

scoder commented Sep 3, 2018

Sounds good to me. PR welcome.

Look at the TreeFragment class. It's not designed as an external API, but it comes very close to what you want.

Getting syntax errors is easy, look at the Errors module and follow its usage, e.g. in the test runner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment