walkBlockDeclarations() — vue Function Reference
Architecture documentation for the walkBlockDeclarations() function in babelUtils.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 6f036a58_49cd_b26f_a233_d34bf76de66c["walkBlockDeclarations()"] fcee39ec_18fe_7a99_fb49_d33db4d055a4["babelUtils.ts"] 6f036a58_49cd_b26f_a233_d34bf76de66c -->|defined in| fcee39ec_18fe_7a99_fb49_d33db4d055a4 484ec320_49bc_b969_d86d_edc246af3234["walkIdentifiers()"] 484ec320_49bc_b969_d86d_edc246af3234 -->|calls| 6f036a58_49cd_b26f_a233_d34bf76de66c f79682b6_b16d_d6cc_fd65_15384f7cb674["extractIdentifiers()"] 6f036a58_49cd_b26f_a233_d34bf76de66c -->|calls| f79682b6_b16d_d6cc_fd65_15384f7cb674 style 6f036a58_49cd_b26f_a233_d34bf76de66c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/compiler-sfc/src/babelUtils.ts lines 151–171
export function walkBlockDeclarations(
block: BlockStatement | Program,
onIdent: (node: Identifier) => void
) {
for (const stmt of block.body) {
if (stmt.type === 'VariableDeclaration') {
if (stmt.declare) continue
for (const decl of stmt.declarations) {
for (const id of extractIdentifiers(decl.id)) {
onIdent(id)
}
}
} else if (
stmt.type === 'FunctionDeclaration' ||
stmt.type === 'ClassDeclaration'
) {
if (stmt.declare || !stmt.id) continue
onIdent(stmt.id)
}
}
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does walkBlockDeclarations() do?
walkBlockDeclarations() is a function in the vue codebase, defined in packages/compiler-sfc/src/babelUtils.ts.
Where is walkBlockDeclarations() defined?
walkBlockDeclarations() is defined in packages/compiler-sfc/src/babelUtils.ts at line 151.
What does walkBlockDeclarations() call?
walkBlockDeclarations() calls 1 function(s): extractIdentifiers.
What calls walkBlockDeclarations()?
walkBlockDeclarations() is called by 1 function(s): walkIdentifiers.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free