Comments (6)
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.
This is handled by #587 and will be in the next beta release which should be 7.0.0-beta.15 (soon)
from babylon.
@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.
For reference: @jayphelps proposed a different production for decorators here:
wycats/javascript-decorators#23 (comment)
from babylon.
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.
@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)
- Can't use object-rest-spread in a function HOT 6
- Should we allow Flowtype `import type` statements when `sourceType:script`? HOT 2
- How to get the "root" path HOT 5
- ES2016 bind syntax does not work with functions HOT 5
- Flow interfaces & `declare class` do not adhere to ASI HOT 2
- Warning if tests fail that if you need to generate fixtures. HOT 2
- React 16 SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag HOT 7
- Set id to null for ArrowFunctionExpressions? HOT 3
- babylon super.xxx will cause performance is very slow HOT 1
- Add sourceType 'function' HOT 12
- Typescript: ExportNamedDeclaration raises SyntaxError when exportExtensions plugin enabled HOT 1
- Unable to parse a class get method with a decorator HOT 2
- static field initializer as an arrow function containing new.target is not allowed
- Unexpected AST for pipeline operator with arrow function HOT 2
- Flow comment parsing HOT 8
- typescript: Support binding pattern in signature HOT 2
- Existential return type annot in arrow function confused with `*=` operator HOT 5
- Error w/ generics in return type annots inside JSXExpressionContainers HOT 3
- [Presets: React + Typescript] Complex method with generic type fails during transpilation HOT 2
- PSA: this repo has been moved to the main babel repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babylon.