Git Product home page Git Product logo

Comments (14)

emicklei avatar emicklei commented on June 3, 2024 3

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.

from proto.

bufdev avatar bufdev commented on June 3, 2024 1

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).

from proto.

emicklei avatar emicklei commented on June 3, 2024

yes sure.

the scanner knows the line so hopefully without much effort, you could add e.g. LineNumber to each node type.

from proto.

bufdev avatar bufdev commented on June 3, 2024

from proto.

emicklei avatar emicklei commented on June 3, 2024

do you expect to finish this in the near future? Otherwise, I will put some time to it

from proto.

bufdev avatar bufdev commented on June 3, 2024

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

from proto.

emicklei avatar emicklei commented on June 3, 2024

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

from proto.

bufdev avatar bufdev commented on June 3, 2024

Hey, sorry about the delay. You may want to just continue on his work, Robbert is held up on a few things.

from proto.

robbertvanginkel avatar robbertvanginkel commented on June 3, 2024

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.

from proto.

bufdev avatar bufdev commented on June 3, 2024

Hey @emicklei how does that look as a start? We could do column after.

from proto.

emicklei avatar emicklei commented on June 3, 2024

hi,

@robbertvanginkel , @peter-edge thank you for all this work. Quite a big effort.
I was planning to continue with the feature by replacing the LineNumbers field to a Position struct (just lik go parser is doing). I had the impression you (your team) no longer had time to work on it.

from proto.

emicklei avatar emicklei commented on June 3, 2024

I like to proceed with the branch proposed and rewrite it to use the Position type instead.

from proto.

emicklei avatar emicklei commented on June 3, 2024

see https://github.com/emicklei/proto/tree/linenumbers

from proto.

emicklei avatar emicklei commented on June 3, 2024

@peter-edge @robbertvanginkel thank you for contributing. I just merged the changes

from proto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.