Repository navigation
Add absolute source offsets to parsed selector nodes - #341
deepanshupal wants to merge 4 commits into
Conversation
|
Sorry for the wait. Your draft note says you opened it for review, and that review is what was missing, not anything on your side. I rebuilt it on current That is the right value, and it is what #243 asks for, so it is welcome. But it changes an existing property, the description does not mention it, and no test pins it, so as it stands it reads as a side effect rather than a fix. Two things before this leaves draft:
With those, I will take it. One practical note: |
Addresses #251. Parsed nodes now include zero-based UTF-16
source.start.offsetand inclusivesource.end.offset, derived from the tokenizer's existing positions. The public TypeScript declaration includes the optional offsets.Tests cover multiline and nested selectors, CRLF, attributes, named combinators, empty pseudos, and words joined from multiple tokens. I claimed the issue after the maintainer welcomed a PR. Opening as a draft for review.
Validation:
npm test(804 passed), lint, typecheck and coverage passed;git diff --checkpassed.format:checkfails only on untouchedsrc/__tests__/exceptions.mjs, which fails on the clean HEAD as well. AI assistance was used for investigation and implementation; outputs and tests were reviewed locally.