One step among an element's children. False when the file is given up.
(top: Frame, c: number)
| 488 | |
| 489 | /** One step among an element's children. False when the file is given up. */ |
| 490 | private children(top: Frame, c: number): boolean { |
| 491 | const src = this.src; |
| 492 | const i = this.i; |
| 493 | if (c === 123) { |
| 494 | this.codeFrame(); |
| 495 | this.i = i + 1; |
| 496 | return true; |
| 497 | } |
| 498 | if (c === 60) { |
| 499 | const d = src.charCodeAt(i + 1); |
| 500 | if (d === 47) { |
| 501 | const start = skipSpace(src, i + 2); |
| 502 | const end = nameEnd(src, start); |
| 503 | const gt = skipSpace(src, end); |
| 504 | if (src.charCodeAt(gt) !== 62 || src.slice(start, end) !== top.name) return this.reread(); |
| 505 | this.i = gt + 1; |
| 506 | this.closeElement(); |
| 507 | return true; |
| 508 | } |
| 509 | if ((d === 62 || isIdStart(d)) && this.openElement(i)) return true; |
| 510 | return this.reread(); |
| 511 | } |
| 512 | // JSX text can't hold a `>` or a `}`: code read as text. |
| 513 | if (c === 62 || c === 125) return this.reread(); |
| 514 | let end = i + 1; |
| 515 | for (let e = src.charCodeAt(end); end < this.n && e !== 123 && e !== 60 && e !== 62 && e !== 125; e = src.charCodeAt(++end)); |
| 516 | this.i = end; |
| 517 | return true; |
| 518 | } |
| 519 | } |
no test coverage detected