| 2025 | } |
| 2026 | |
| 2027 | private comment(s: string, i: number): number { |
| 2028 | const end = s.indexOf("-->", i + 4) |
| 2029 | if (end === -1) return -1 |
| 2030 | const dashes = s.indexOf("--", i + 4) |
| 2031 | if (dashes < end) throw this.syntax("\"--\" is not allowed in comments", dashes) |
| 2032 | this.checkSize(i, end + 3) |
| 2033 | this.flushText() |
| 2034 | this.out.push({ _tag: "Comment", text: normalizeLines(s.slice(i + 4, end)) }) |
| 2035 | return end + 3 |
| 2036 | } |
| 2037 | |
| 2038 | private processingInstruction(s: string, i: number): number { |
| 2039 | const end = s.indexOf("?>", i + 2) |