tova 0.2.6 → 0.2.7
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.
- package/package.json +1 -1
- package/src/analyzer/analyzer.js +11 -1
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/analyzer/analyzer.js
CHANGED
|
@@ -703,7 +703,8 @@ export class Analyzer {
|
|
|
703
703
|
|
|
704
704
|
visitSharedBlock(node) {
|
|
705
705
|
const prevScope = this.currentScope;
|
|
706
|
-
|
|
706
|
+
const sharedScope = this.currentScope.child('shared');
|
|
707
|
+
this.currentScope = sharedScope;
|
|
707
708
|
try {
|
|
708
709
|
for (const stmt of node.body) {
|
|
709
710
|
this.visitNode(stmt);
|
|
@@ -711,6 +712,13 @@ export class Analyzer {
|
|
|
711
712
|
} finally {
|
|
712
713
|
this.currentScope = prevScope;
|
|
713
714
|
}
|
|
715
|
+
// Promote shared symbols (types, functions) to parent scope
|
|
716
|
+
// so server/client blocks can reference them
|
|
717
|
+
for (const [name, sym] of sharedScope.symbols) {
|
|
718
|
+
if (!prevScope.symbols.has(name)) {
|
|
719
|
+
prevScope.symbols.set(name, sym);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
714
722
|
}
|
|
715
723
|
|
|
716
724
|
// ─── Declaration visitors ─────────────────────────────────
|
|
@@ -1982,6 +1990,8 @@ export class Analyzer {
|
|
|
1982
1990
|
}
|
|
1983
1991
|
case 'ExpressionStatement':
|
|
1984
1992
|
return this._definitelyReturns(node.expression);
|
|
1993
|
+
case 'CallExpression':
|
|
1994
|
+
return true;
|
|
1985
1995
|
default:
|
|
1986
1996
|
return false;
|
|
1987
1997
|
}
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Auto-generated by scripts/embed-runtime.js — do not edit
|
|
2
|
-
export const VERSION = "0.2.
|
|
2
|
+
export const VERSION = "0.2.7";
|