(anchor: string | null)
| 1457 | ); |
| 1458 | } |
| 1459 | readAnchorProperty(anchor: string | null): string | void { |
| 1460 | let ch = this.#scanner.peek(); |
| 1461 | if (ch !== AMPERSAND) return; |
| 1462 | |
| 1463 | if (anchor !== null) { |
| 1464 | throw this.#createError( |
| 1465 | "Cannot read anchor property: duplicate anchor property", |
| 1466 | ); |
| 1467 | } |
| 1468 | this.#scanner.next(); |
| 1469 | ch = this.#scanner.peek(); |
| 1470 | |
| 1471 | const position = this.#scanner.position; |
| 1472 | while (ch !== 0 && !isWhiteSpaceOrEOL(ch) && !isFlowIndicator(ch)) { |
| 1473 | this.#scanner.next(); |
| 1474 | ch = this.#scanner.peek(); |
| 1475 | } |
| 1476 | |
| 1477 | if (this.#scanner.position === position) { |
| 1478 | throw this.#createError( |
| 1479 | "Cannot read anchor property: name of an anchor node must contain at least one character", |
| 1480 | ); |
| 1481 | } |
| 1482 | |
| 1483 | return this.#scanner.source.slice(position, this.#scanner.position); |
| 1484 | } |
| 1485 | readAlias(): string | void { |
| 1486 | if (this.#scanner.peek() !== ASTERISK) return; |
| 1487 |
no test coverage detected