chore(JsAnalyzer.ts): Add a comment for clarity

+ fix the other comment
This commit is contained in:
Luan
2025-10-27 02:43:06 -03:00
committed by GitHub
parent 6ce981ced9
commit e140944dd9

View File

@@ -136,6 +136,8 @@ export class JsAnalyzer {
const right = assignment.right;
if (left.type === 'Identifier') {
// This identifier existing means it was a pre-declared and
// we just got to it.
const existingVariable = this.declaredVariables.get(left.name);
if (!existingVariable) continue;
@@ -187,10 +189,10 @@ export class JsAnalyzer {
const init = declaration.init;
// "var x, y, z;"
if (!init && currentNode.kind === 'var') {
metadata.predeclared = true;
} else if (init && this.needsDependencyAnalysis(init)) {
// "var x, y, z;"
metadata.dependencies = this.findDependencies(init, metadata.name);
}
@@ -560,4 +562,4 @@ export class JsAnalyzer {
public getSource(): string {
return this.source;
}
}
}