Home / Function/ markScopeIdentifier() — vue Function Reference

markScopeIdentifier() — vue Function Reference

Architecture documentation for the markScopeIdentifier() function in babelUtils.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  fb4ee6b7_365f_2a4c_8784_a7a6f85b364d["markScopeIdentifier()"]
  89db3100_db23_2ba5_52ae_1299b220043a["walkIdentifiers()"]
  89db3100_db23_2ba5_52ae_1299b220043a -->|calls| fb4ee6b7_365f_2a4c_8784_a7a6f85b364d
  style fb4ee6b7_365f_2a4c_8784_a7a6f85b364d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/babelUtils.ts lines 218–233

function markScopeIdentifier(
  node: Node & { scopeIds?: Set<string> },
  child: Identifier,
  knownIds: Record<string, number>
) {
  const { name } = child
  if (node.scopeIds && node.scopeIds.has(name)) {
    return
  }
  if (name in knownIds) {
    knownIds[name]++
  } else {
    knownIds[name] = 1
  }
  ;(node.scopeIds || (node.scopeIds = new Set())).add(name)
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does markScopeIdentifier() do?
markScopeIdentifier() is a function in the vue codebase.
What calls markScopeIdentifier()?
markScopeIdentifier() 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