Skip to content

Splitting up node.rb #37

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

Closed
dleavitt opened this issue Apr 8, 2022 · 1 comment
Closed

Splitting up node.rb #37

dleavitt opened this issue Apr 8, 2022 · 1 comment

Comments

@dleavitt
Copy link

dleavitt commented Apr 8, 2022

On this and the prettier-ruby gem, I found that the "everything in one file" situation to be a bit of an obstacle to contributing and understanding what's going on. I notice you've started splitting up the different pieces - would you be open to a PR that puts each Node subclass in its own file?

@kddnewton
Copy link
Member

I don't really want to move them into different files tbh. I do want to move the entire formatting capability out into its own thing, and just keep the node definitions together. The thing is when they're in the same file it makes it really easy to make mass changes, as I have so far with the visitor pattern, pretty printing, and inheriting from the parent node class. It would have been harder doing that in different files.

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

No branches or pull requests

2 participants