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
  43c62e56_9ebc_fc36_915f_af5e7c065dd6["markScopeIdentifier()"]
  eb301be5_f530_960e_129f_798877ea7f83["walkIdentifiers()"]
  eb301be5_f530_960e_129f_798877ea7f83 -->|calls| 43c62e56_9ebc_fc36_915f_af5e7c065dd6
  style 43c62e56_9ebc_fc36_915f_af5e7c065dd6 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