Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ryan-m-walker
Copy link
Contributor

@ryan-m-walker ryan-m-walker commented Nov 5, 2025

Summary

I am currently working on issue #6725 to add support for the new CSS if feature and while doing so had to add new syntax kinds. In doing so though I realized that adding them will go over a current limit of how many syntax kinds are able to be supported by the parser. Currently there are about 507 existing CSS kinds and the limit is 512. I wanted to split this out as it's own PR though, separate from the feature work since this is a deeper change to the parser and think it deserves more scrutiny. This PR just adds another u128 to the SyntaxKindSet struct array to increase the max syntax kinds to 640.

Test Plan

Full test suite of the repo passes

Docs

n/a

AI Assistance Disclosure

Claude Code was used to help locate where in the codebase the change needed to happen while working on the CSS if feature. The issue was originally surfaced by this check failing though.

@changeset-bot
Copy link

changeset-bot bot commented Nov 5, 2025

⚠️ No Changeset found

Latest commit: 7ed1dbb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the A-Core Area: core label Nov 5, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 5, 2025

CodSpeed Performance Report

Merging #7994 will not alter performance

Comparing ryan-m-walker:chore/increase-size-of-syntax-kind-bitfield (7ed1dbb) with main (0b28f5f)

Summary

✅ 4 untouched
⏩ 136 skipped1

Footnotes

  1. 136 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 5, 2025

Walkthrough

The SyntaxKindSet bitset was expanded from 4 to 5 limbs. The public struct signature, from_raw initialisation, internal bits array, and union method were updated accordingly to handle the additional limb. The from_raw documentation example was also updated to reflect the structural changes.

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: expanding the SyntaxKindSet bitfield capacity from 512 to 640 kinds.
Description check ✅ Passed The PR description clearly relates to the changeset, explaining the motivation (CSS if feature work), the problem (512 syntax kind limit), and the solution (expanding SyntaxKindSet from 4 to 5 u128 limbs).
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ematipico
Copy link
Member

@ryan-m-walker did you verify that this change actually allows you to add more nodes?

@ryan-m-walker
Copy link
Contributor Author

@ematipico yeah, I have a working branch for the if feature that includes this change and and all the tests including new ones I've added for the new feature pass. I'm going to open a follow up PR related to this one with changes to token_set.rs as well though since some tests also found some exceded limits there TokenSet. I just wanted to break these particular more critical changes into small, easy to review PRs since the if one is going to be kinda big with all the new codegen code it entails

@ryan-m-walker
Copy link
Contributor Author

@ematipico this is the other related PR: #7997

@ematipico ematipico merged commit fe2c8df into biomejs:main Nov 5, 2025
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Core Area: core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants