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

Method resolveMarkupReader

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

Source from the content-addressed store, hash-verified

80 }
81
82 private resolveMarkupReader(): () => void {
83 if (this.startsWith('<!--')) return () => this.skipUntil('-->', 'Comment is not closed.');
84 if (this.startsWith('<?'))
85 return () => this.skipUntil('?>', 'Processing instruction is not closed.');
86 if (this.startsWith('<![CDATA[')) return () => this.readCdata();
87 if (this.startsWith('<!')) return () => this.skipDeclaration();
88 if (this.startsWith('</')) return () => this.readClosingTag();
89 return () => this.readOpeningTag();
90 }
91
92 private assertFullyClosed(): void {
93 if (this.stack.length > 0) {

Callers 1

readNextTokenMethod · 0.95

Calls 6

startsWithMethod · 0.95
skipUntilMethod · 0.95
readCdataMethod · 0.95
skipDeclarationMethod · 0.95
readClosingTagMethod · 0.95
readOpeningTagMethod · 0.95

Tested by

no test coverage detected