Giter Site home page Giter Site logo

Comments (7)

Bogdanp avatar Bogdanp commented on July 21, 2024

The changes coming to combine ought to make this (and dealing with indentation) easier.

from elm-ast.

dynajoe avatar dynajoe commented on July 21, 2024

Thoughts on adding Combine.Location to all types? This could be first type parameter or last.

from elm-ast.

wende avatar wende commented on July 21, 2024

@joeandaverde That's a good idea. I think that given there might be more information to that in future it'd be nice to add something like

type alias Meta = {location : Combine.Location}

So that we have a place for extension in future without another Major change

from elm-ast.

dynajoe avatar dynajoe commented on July 21, 2024

While attempting to make this change it seems that the parser combinator library is not calculating column/line offset correctly.

See my master branch here

https://github.com/joeandaverde/elm-ast/

There are times it reports a column of -1.

For a string input such as "x : Int" it reports line 1 instead of 0.

I very well could have used the library inappropriately (possibly wrong order of operations). I could use another eye on it.

from elm-ast.

wende avatar wende commented on July 21, 2024

@joeandaverde
Hmm. The code looks fine to me. It might be that there is a bug in elm-community/parser-combinators

from elm-ast.

laslowh avatar laslowh commented on July 21, 2024

I'm no expert, but the pull request #84 that Baransu looks like it's done the heavy lifting for this. Is there someone who could finish off the last remaining 4 items?

from elm-ast.

baransu avatar baransu commented on July 21, 2024

@laslowh The problem with remaining items is, they are in case of Variable and BinOp created by hand, without Parser context so there is no easy way get metadata. I've created PR counting on community support because I'm out of ideas how this could be done the easy way. Maybe @joeandaverde who initially started working on that could help me out figuring this.

from elm-ast.

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.