@nodescript/core
Advanced tools
Comparing version 0.15.1 to 0.15.2
@@ -56,2 +56,3 @@ import { isSchemaCompatible } from '../util/index.js'; | ||
this.awaitSym = this.async ? 'await ' : ''; | ||
this.prepareSymbols(); | ||
} | ||
@@ -115,4 +116,3 @@ compileEsm() { | ||
this.emitComment(`${node.ref} ${node.id}`); | ||
const sym = this.nextSym('r'); | ||
this.symtable.set(`node:${node.id}`, sym); | ||
const sym = this.getNodeSym(node.id); | ||
this.code.block(`${this.asyncSym}function ${sym}(params, ctx) {`, `}`, () => { | ||
@@ -391,2 +391,8 @@ this.emitNodePreamble(node); | ||
} | ||
prepareSymbols() { | ||
for (const node of this.order) { | ||
const sym = this.nextSym('r'); | ||
this.symtable.set(`node:${node.id}`, sym); | ||
} | ||
} | ||
} | ||
@@ -393,0 +399,0 @@ export class CompilerError extends Error { |
{ | ||
"name": "@nodescript/core", | ||
"version": "0.15.1", | ||
"version": "0.15.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Visual programming language for Browser and Node", |
Sorry, the diff of this file is not supported yet
128731
2290