Giter VIP home page Giter VIP logo

Comments (6)

abtris avatar abtris commented on May 24, 2024

@klokane commented

ping @pksunkara @zdne
please take a look

same result for array

from drafter.

abtris avatar abtris commented on May 24, 2024

@pksunkara commented

As I said, this is intentional. The AST produced by snowcrash should depict what the user exactly wrote. Even though, they mean the same, they can be represented differently in the AST.

Although, there is a different bug in this too. apiaryio/snowcrash#286

from drafter.

abtris avatar abtris commented on May 24, 2024

@klokane commented

Oh sry for duplicity, issue apiaryio/snowcrash#286 I miss.
I'm in trouble in refract AST implementation because there is no way to say if value is sample.
Except workarround, while I check last && first value for presence of asterisk, and cut them from literal.
But I mean it is really weird solution!

What do you mean about it @zdne ?

from drafter.

abtris avatar abtris commented on May 24, 2024

@zdne commented

@klokane @pksunkara

The AST produced by snowcrash should depict what the user exactly wrote

Originally this was the case, yes. However as we are moving forward this should not be the case in a future. I would strongly recommend to move away from different AST for different notations of the same thing (as is the case here). Instead – in a future – both should be parsed into the same structure (refract tree). It is the task for a (future) source map to help user – if needed – to figure out whether the sample value comes from one line or multiple lines.

So I do not think this is a bug at the moment, however when we move to parsing into refract I would move away fro this practice (it will also make manipulation with the parse (refract) tree a lot easier).

from drafter.

abtris avatar abtris commented on May 24, 2024

@zdne commented

@klokane as for any issues with refract implementation – can we discuss it over Slack or in person?

from drafter.

abtris avatar abtris commented on May 24, 2024

@klokane commented

@zdne i mean, better will be personal with public output opened for comments

from drafter.

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.