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

Don't define Base.range(::SyntaxNode) #417

Closed
LilithHafner opened this issue Feb 17, 2024 · 2 comments · Fixed by #463
Closed

Don't define Base.range(::SyntaxNode) #417

LilithHafner opened this issue Feb 17, 2024 · 2 comments · Fixed by #463

Comments

@LilithHafner
Copy link
Member

LilithHafner commented Feb 17, 2024

The JuliaSyntax method range(::SyntaxNode) provides very useful functionality, but I personally don't think it is semantically aligned with the generic Base.range function enough to be a method of that function. Opening this issue to solicit other folks' opinions.

I would prefer a parent_indices or indices function.

@LilithHafner
Copy link
Member Author

Base.parentindices is probably the right name for this (thanks to @aplavin for pointing that out in a different context)

@c42f
Copy link
Member

c42f commented Mar 12, 2024

Totally fair... Base.range() was not a good choice :-)

To be quite honest I want to rewrite the SyntaxNode API completely, I don't think it hits a good point in the design space for syntax trees.

I have a bunch of ideas, just haven't had time/mental space to articulate them somewhere outside my brain yet 😅

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

Successfully merging a pull request may close this issue.

2 participants