Skip to content

Commit e9473c0

Browse files
committed
Remove redundant comments from parser and SAX engine
1 parent cdbfaad commit e9473c0

2 files changed

Lines changed: 0 additions & 5 deletions

File tree

eksml/src/parser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ export function parse(
302302
S.charCodeAt(pos + 8) === LBRACKET &&
303303
S.substring(pos + 3, pos + 8).toLowerCase() === 'cdata'
304304
) {
305-
// cdata
306305
const cdataEndIndex = S.indexOf(']]>', pos);
307306
if (cdataEndIndex === -1) {
308307
if (strict) throw strictError('Unclosed CDATA section');
@@ -635,7 +634,6 @@ export function parse(
635634
if (strict && !S[pos]) {
636635
throw strictError(`Unclosed tag <${tagName}>`);
637636
}
638-
// optional parsing of children
639637
// Self-closing: explicit />, processing instruction ?>, or declaration <!...>
640638
if (
641639
S.charCodeAt(pos - 1) !== SLASH &&

eksml/src/saxEngine.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,17 +353,14 @@ export function saxEngine(options: SaxEngineOptions = {}): SaxEngineParser {
353353
// OPEN_TAG_NAME — batch scan for end of name
354354
// ==================================================================
355355
case State.OPEN_TAG_NAME: {
356-
// Scan ahead for end of tag name
357356
let j = i;
358357
while (j < chunkLength) {
359358
const charCode = chunk.charCodeAt(j);
360359
if (isNameEnd(charCode)) break;
361360
j++;
362361
}
363-
// Accumulate what we scanned
364362
if (j > i) tagName += chunk.substring(i, j);
365363
if (j >= chunkLength) {
366-
// Tag name continues in next chunk
367364
i = chunkLength;
368365
continue;
369366
}

0 commit comments

Comments
 (0)