lexBinding() — vue Function Reference
Architecture documentation for the lexBinding() function in cssVars.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 8311b2cf_b53e_2e33_2ec7_c3c9be5abac7["lexBinding()"] b1640b15_d391_0cad_5859_5943e95998a9["parseCssVars()"] b1640b15_d391_0cad_5859_5943e95998a9 -->|calls| 8311b2cf_b53e_2e33_2ec7_c3c9be5abac7 6d0c1bb9_8891_e648_20f9_17e9dfeb6607["cssVarsPlugin()"] 6d0c1bb9_8891_e648_20f9_17e9dfeb6607 -->|calls| 8311b2cf_b53e_2e33_2ec7_c3c9be5abac7 style 8311b2cf_b53e_2e33_2ec7_c3c9be5abac7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/compiler-sfc/src/cssVars.ts lines 69–104
function lexBinding(content: string, start: number): number | null {
let state: LexerState = LexerState.inParens
let parenDepth = 0
for (let i = start; i < content.length; i++) {
const char = content.charAt(i)
switch (state) {
case LexerState.inParens:
if (char === `'`) {
state = LexerState.inSingleQuoteString
} else if (char === `"`) {
state = LexerState.inDoubleQuoteString
} else if (char === `(`) {
parenDepth++
} else if (char === `)`) {
if (parenDepth > 0) {
parenDepth--
} else {
return i
}
}
break
case LexerState.inSingleQuoteString:
if (char === `'`) {
state = LexerState.inParens
}
break
case LexerState.inDoubleQuoteString:
if (char === `"`) {
state = LexerState.inParens
}
break
}
}
return null
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does lexBinding() do?
lexBinding() is a function in the vue codebase.
What calls lexBinding()?
lexBinding() is called by 2 function(s): cssVarsPlugin, parseCssVars.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free