MCPcopy Create free account
hub / github.com/Effect-TS/effect / checkPending

Method checkPending

packages/effect/src/encoding/Xml.ts:1540–1548  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1538 // Fails an incomplete token over maxTokenSize, preferring an error in the
1539 // first maxTokenSize + 1 characters of markup, as `parse` does
1540 private checkPending(): void {
1541 const text = this.scanner.state === S_TEXT
1542 if (this.pendingLength + (text ? this.textSize : 0) <= this.maxTokenSize) return
1543 if (!text) {
1544 this.load(this.pending!.join("").slice(0, this.maxTokenSize + 1), this.pendingStart)
1545 this.markup(this.buf, 0)
1546 }
1547 throw this.tokenLimit(this.pendingStart)
1548 }
1549
1550 private parse(final: boolean): void {
1551 const s = this.buf

Callers 2

consumeMethod · 0.95
parseMethod · 0.95

Calls 5

loadMethod · 0.95
markupMethod · 0.95
tokenLimitMethod · 0.95
sliceMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected