From e140944dd9538cdf56fb8ff8f3ccb45617d4c87e Mon Sep 17 00:00:00 2001 From: Luan Date: Mon, 27 Oct 2025 02:43:06 -0300 Subject: [PATCH] chore(JsAnalyzer.ts): Add a comment for clarity + fix the other comment --- src/utils/javascript/JsAnalyzer.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/javascript/JsAnalyzer.ts b/src/utils/javascript/JsAnalyzer.ts index ea6884d1..1da84878 100644 --- a/src/utils/javascript/JsAnalyzer.ts +++ b/src/utils/javascript/JsAnalyzer.ts @@ -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; } -} \ No newline at end of file +}