-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add line numbers to all Visitees? #7
Comments
yes sure. the scanner knows the line so hopefully without much effort, you could add e.g. LineNumber to each node type. |
Ok great, will send you something :-)
…On Fri, Aug 4, 2017 at 1:44 PM Ernest Micklei ***@***.***> wrote:
yes sure.
the scanner knows the line so hopefully without much effort, you could add
e.g. LineNumber to each node type.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AECGvDodaS0LTUz_ihob0dUrIYNtsI0Hks5sU4K_gaJpZM4OuHtV>
.
|
do you expect to finish this in the near future? Otherwise, I will put some time to it |
One of my colleagues is almost finished on this, but has an off-by-one error https://github.com/emicklei/proto/compare/master...robbertvanginkel:linenumbers?expand=1, he should be finished with this soon |
Thinking about this upcoming change, what if we add the column position on the line as well. Similar to https://golang.org/src/go/token/position.go |
Hey, sorry about the delay. You may want to just continue on his work, Robbert is held up on a few things. |
I opened #10, which gets adds the line numbers and tests for the cases I could find. I don't plan on working on it more, not sure if its the best approach either as I'm still getting to know go as a language. I put up the pr so it can be continued/merge/closed as you see fit. |
Hey @emicklei how does that look as a start? We could do column after. |
hi, @robbertvanginkel , @peter-edge thank you for all this work. Quite a big effort. |
Hey, Totally up to you! I'm hoping to have at least line numbers sooner than later, I have my own linter I need to implement (which maybe eventually I can contribute back), and I require at least line numbers for it (but column would be great too). |
I like to proceed with the branch proposed and rewrite it to use the Position type instead. |
lot of work has been done ; major refactoring. I am now at the point that a few tests are failing. Hope to finish it in the next days. |
@peter-edge @robbertvanginkel thank you for contributing. I just merged the changes |
I'd like to write a linter based on this library, and line numbers for all Visitees would be great. I can put together a PR to this effect if this is something you'd be open to.
The text was updated successfully, but these errors were encountered: