Giter Site home page Giter Site logo

Comments (5)

alexcrichton avatar alexcrichton commented on July 21, 2024

Yeah unfortunately this library doesn't support this use case very well right now. I'm hoping to update it at some point in the future to have a more feature-ful AST (with a different API) to allow preserving components such as whitespace and comments.

That being said it's pretty far off, so I wouldn't hold your breath any time soon :(

from toml-rs.

alexcrichton avatar alexcrichton commented on July 21, 2024

I've rewritten the parser in #137 and the lowest layer (tokenization) supports whitespace/comments and otherwise preserving the original source where appropriate, but beyond that I haven't made much progress on this.

from toml-rs.

sedrik avatar sedrik commented on July 21, 2024

Do you have a work in progress that we can look at and contribute to? I think the idea of parsing into a AST that can then later on be serialized into different formats (among others JSON and back to TOML) is the best approach.

from toml-rs.

alexcrichton avatar alexcrichton commented on July 21, 2024

Nah unfortunately not much more that #137. The src/tokens.rs is likely the starting point (as it preserves everything), but much more support is going to be needed.

from toml-rs.

epage avatar epage commented on July 21, 2024

Maintenance of this crate has moved to the https://github.com/toml-rs/toml repo. As a heads up, we plan to move toml to be on top of toml_edit, see toml-rs/toml#340.

Closing this out. If this is still a problem, feel free to recreate this issue in the new repo.

from toml-rs.

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.