* Walking iterates the statements and expressions and processes them * @param {(Statement | ModuleDeclaration)[]} statements statements
(statements)
| 2174 | * @param {(Statement | ModuleDeclaration)[]} statements statements |
| 2175 | */ |
| 2176 | walkStatements(statements) { |
| 2177 | let onlyFunctionDeclaration = false; |
| 2178 | |
| 2179 | for (let index = 0, len = statements.length; index < len; index++) { |
| 2180 | const statement = statements[index]; |
| 2181 | |
| 2182 | if ( |
| 2183 | onlyFunctionDeclaration && |
| 2184 | statement.type !== "FunctionDeclaration" && |
| 2185 | this.hooks.unusedStatement.call(/** @type {Statement} */ (statement)) |
| 2186 | ) { |
| 2187 | continue; |
| 2188 | } |
| 2189 | |
| 2190 | this.walkStatement(statement); |
| 2191 | |
| 2192 | if (this.scope.terminated) { |
| 2193 | onlyFunctionDeclaration = true; |
| 2194 | } |
| 2195 | } |
| 2196 | } |
| 2197 | |
| 2198 | /** |
| 2199 | * Walking iterates the statements and expressions and processes them |
no test coverage detected