GithubHelp home page GithubHelp logo

Comments (6)

machty avatar machty commented on May 14, 2024 7

I'd love to be able to experiment with this syntax for ember-concurrency.com

Ember.Object.extend({
    @restartableTask
    *doStuff() {
      // ..
    }
})

but I'm running into this same issue. While there are probably a handful of things that need to be settled about decorators, @wycats tells me the above syntax is uncontroversial; would it be possible to sneak in a fix just for the above (without having to wait for a brand new plugin)?

from babylon.

hzoo avatar hzoo commented on May 14, 2024 4

This is handled by #587 and will be in the next beta release which should be 7.0.0-beta.15 (soon)

from babylon.

silkentrance avatar silkentrance commented on May 14, 2024

@loganfsmyth It seems that Parser#parseDecorator() will swallow up the asterisk and parse everything until after the method's name, or rather what it considers to be a call expression, i.e. @decorator * gen() seems to be parsed as a single expression here, which it is not.

And since Parser#parseDecorator() calls upon Parser#parseMaybeAssign() I am quite unsure how to proceed further as this is being used all over the place.

Perhaps a little help from you guys?

from babylon.

silkentrance avatar silkentrance commented on May 14, 2024

For reference: @jayphelps proposed a different production for decorators here:
wycats/javascript-decorators#23 (comment)

from babylon.

loganfsmyth avatar loganfsmyth commented on May 14, 2024

Yeah I have no idea what the expectation was. When I originally directed you here I thought that the spec had already been updated to cover this. If it hasn't, I'm not sure there is much we can do until there's an official spec decision.

from babylon.

silkentrance avatar silkentrance commented on May 14, 2024

@loganfsmyth well, you seem to be the go-to guy in all aspects, so I thought that maybe you can call upon someone to also have a look into this, so maybe with the help of @wycats this can then be sorted out, chiming in the guys who implemented babylon and fixing the issues as the spec gets updated...
while I continue to figure out how the code works... 😁

from babylon.

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.