()
| 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 |
no test coverage detected