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

Better scope prism's C API #2888

Open
kddnewton opened this issue Jun 13, 2024 · 0 comments
Open

Better scope prism's C API #2888

kddnewton opened this issue Jun 13, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@kddnewton
Copy link
Collaborator

At the moment, prism exposes a lot of structs and functions in its C API. Overall, the shape is not clearly defined. We should take a couple of steps to resolve this:

  • We should have a split between our public and private header files.
  • Ideally, I would love pm_node_t to be an opaque pointer. Because they are always heap-allocated, we should be able to get away with this.
  • The public API should be documented here: https://ruby.github.io/prism/c/index.html. At the moment, it is clear that too much is exposed.
  • Every attribute should have a defined getter macro to make it maintainable going forward, in case we need to change a name or the structure of the AST.
@kddnewton kddnewton added the enhancement New feature or request label Jun 13, 2024
@kddnewton kddnewton added this to the Long-term milestone Jun 13, 2024
@kddnewton kddnewton modified the milestones: Long-term, Short-term Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant