porffor 0.47.8 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3014,7 +3014,6 @@ const generateVarDstr = (scope, kind, pattern, init, defaultValue, global) => {
3014
3014
  }
3015
3015
  }
3016
3016
 
3017
-
3018
3017
  const topLevel = scope.name === 'main';
3019
3018
 
3020
3019
  if (typeof pattern === 'string') {
@@ -3036,6 +3035,11 @@ const generateVarDstr = (scope, kind, pattern, init, defaultValue, global) => {
3036
3035
  }
3037
3036
  }
3038
3037
 
3038
+ if (defaultValue && isFuncType(defaultValue.type)) {
3039
+ // set id as name, but do not use it as it is only default value
3040
+ if (!defaultValue.id) defaultValue.id = { name };
3041
+ }
3042
+
3039
3043
  if (topLevel && Object.hasOwn(builtinVars, name)) {
3040
3044
  // cannot redeclare
3041
3045
  if (kind !== 'var') return internalThrow(scope, 'SyntaxError', `Identifier '${unhackName(name)}' has already been declared`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
4
- "version": "0.47.8",
4
+ "version": "0.48.0",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.47.8';
3
+ globalThis.version = '0.48.0';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {