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 9aab9c2 commit 313339cCopy full SHA for 313339c
1 file changed
src/utils.ts
@@ -155,7 +155,8 @@ export function generateFlowSourceCode(
155
let code = `${indent}`;
156
157
if (node.functionDefinition.identifier === "std::control::return") {
158
- code += `return /* @pos ${id} null */ ${funcName}(${args.join(", ")})${needsAnyCast ? "" : ""} ;\n`
+ code += `const ${varName} = /* @pos ${id} null */ ${funcName}(${args.join(", ")})${needsAnyCast ? "" : ""} ;\n`
159
+ code += `return ${varName};\n`
160
} else if (node.functionDefinition.identifier === "std::control::if") {
161
code += `const ${varName} = /* @pos ${id} null */ ${funcName}(${args.join(", ")})${needsAnyCast ? "" : ""} ;\n`
162
code += `if(${args[0]}) {
0 commit comments