Skip to content

✨ feat(lang): rewrite standalone .attr to self.attr at AST stage#1637

Merged
harehare merged 1 commit intomainfrom
feat/standalone-attr-selector
Apr 23, 2026
Merged

✨ feat(lang): rewrite standalone .attr to self.attr at AST stage#1637
harehare merged 1 commit intomainfrom
feat/standalone-attr-selector

Conversation

@harehare
Copy link
Copy Markdown
Owner

@harehare harehare commented Apr 23, 2026

Standalone attribute selectors like .lang or .depth previously returned NONE because eval_selector treats Selector::Attr(_) as non-matching. They now rewrite to attr(self, "attrName") at parse time, enabling both read and |= assignment forms.

#1627

Standalone attribute selectors like `.lang` or `.depth` previously
returned NONE because `eval_selector` treats `Selector::Attr(_)` as
non-matching. They now rewrite to `attr(self, "attrName")` at parse
time, enabling both read and |= assignment forms.
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 23, 2026

Merging this PR will not alter performance

✅ 29 untouched benchmarks


Comparing feat/standalone-attr-selector (26e3e16) with main (4758cd9)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (c1fdb4c) during the generation of this report, so 4758cd9 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@harehare harehare merged commit 6e78205 into main Apr 23, 2026
6 checks passed
@harehare harehare deleted the feat/standalone-attr-selector branch April 23, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant