MCPcopy
hub / github.com/callstack/agent-device / updateDeclarationBracketDepth

Function updateDeclarationBracketDepth

src/utils/xml.ts:304–312  ·  view source on GitHub ↗
(state: DeclarationScanState, char: string)

Source from the content-addressed store, hash-verified

302}
303
304function updateDeclarationBracketDepth(state: DeclarationScanState, char: string): void {
305 if (char === '[') {
306 state.bracketDepth += 1;
307 return;
308 }
309 if (char === ']' && state.bracketDepth > 0) {
310 state.bracketDepth -= 1;
311 }
312}
313
314function isDeclarationEnd(state: DeclarationScanState, char: string): boolean {
315 return char === '>' && state.bracketDepth === 0;

Callers 1

updateDeclarationScanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected