Skip to content

Commit

Permalink
fix(xml): cleanup comments (see #49)
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter committed May 31, 2024
1 parent 9216aed commit 909ef95
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions xml/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,23 +443,3 @@ function revive(node: xml_node | xml_text, key: string, options: options) {

/** Synchronous reader. */
type ReaderSync = { readSync(buffer: Uint8Array): Nullable<number> }

//TODO(@lowlighter): implement async parsing
/** Asynchronous reader. */
//type Reader = { read(buffer: Uint8Array): Promise<Nullable<number>> }

/*
class MockReader implements Reader {
constructor(string: string) {
this.#data = new TextEncoder().encode(string)
}
readonly #data
#cursor = 0
async read(buffer: Uint8Array) {
const bytes = this.#data.slice(this.#cursor, this.#cursor + buffer.length)
buffer.set(bytes)
this.#cursor = Math.min(this.#cursor + bytes.length, this.#data.length)
return bytes.length || null
}
}
*/

0 comments on commit 909ef95

Please sign in to comment.