We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c06dd7 commit 2b7d27dCopy full SHA for 2b7d27d
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "hertzscript-compiler",
3
- "version": "0.0.2",
+ "version": "0.0.3",
4
"description": "Produces preemptible JavaScript coroutines which conform to the HertzScript specification.",
5
"keywords": [
6
"javascript",
src/BabelPlugin.js
@@ -159,7 +159,8 @@ function Plugin(babel) {
159
funcExp.type = "FunctionExpression";
160
if (funcExp.body.type !== "BlockStatement") {
161
funcExp.body = t.blockStatement([
162
- t.returnStatement(funcExp.body)
+ t.expressionStatement(
163
+ t.yieldExpression(hzReturnArg(funcExp.body)))
164
]);
165
}
166
return t.callExpression(
0 commit comments