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

Method skipDeclaration

src/utils/xml.ts:242–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240 }
241
242 private skipDeclaration(): void {
243 const state: DeclarationScanState = { quote: null, bracketDepth: 0 };
244 for (let cursor = this.index + 2; cursor < this.xml.length; cursor += 1) {
245 if (updateDeclarationScan(state, this.xml[cursor])) {
246 this.index = cursor + 1;
247 return;
248 }
249 }
250 throw new Error('XML declaration is not closed.');
251 }
252
253 private skipUntil(token: string, errorMessage: string): void {
254 // Opening markup tokens are longer than or equal to their closing tokens here, so

Callers 1

resolveMarkupReaderMethod · 0.95

Calls 1

updateDeclarationScanFunction · 0.85

Tested by

no test coverage detected