Update javascript/extractor/src/com/semmle/js/extractor/CFGExtractor.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Asger F
2025-02-06 10:03:28 +01:00
committed by GitHub
parent 6207e39b5f
commit 6ae06aed9e

View File

@@ -1247,7 +1247,7 @@ public class CFGExtractor {
public Void visit(BlockStatement nd, SuccessorInfo i) {
// Hoist function declarations in a block statement to the top of the block.
// This reflects non-standard behaviour implemented by most engines.
// See also: EcmaScript "B.3.2 Block-Level Function Declarations Web Legacy Compatibility Semantics".
// See also: ECMAScript "B.3.2 Block-Level Function Declarations Web Legacy Compatibility Semantics".
List<Identifier> hoisted = HoistedFunDecls.of(nd.getBody());
hoistedFns.addAll(hoisted);
writeSuccessors(nd, visitSequence(hoisted, nd.getBody(), i.getAllSuccessors()));