Add regression test for multiple @function rules with result descriptor#188
Merged
bartveneman merged 1 commit intomainfrom Mar 16, 2026
Merged
Add regression test for multiple @function rules with result descriptor#188bartveneman merged 1 commit intomainfrom
bartveneman merged 1 commit intomainfrom
Conversation
) Add a test covering multiple consecutive @function at-rules that each contain a result: descriptor. In v0.13.3 (before @function support was added), the parser fell into a rules-only parse path that called parse_style_rule() on the result: declaration. The selector scanner would then advance past the closing } and consume the next @function rule as the style rule body, silently dropping every other @function. The fix was already in place (added in 0.13.6 via CONDITIONAL_AT_RULES, then generalised in 0.13.7 so all unknown at-rules use the declarations+ rules+at-rules parse path). This test locks in the correct behaviour. Closes #187
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
=======================================
Coverage 95.23% 95.23%
=======================================
Files 16 16
Lines 2873 2873
Branches 806 806
=======================================
Hits 2736 2736
Misses 137 137 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added a regression test to verify that multiple
@functionrules withresult:descriptors are all parsed correctly.Changes
'multiple @function rules with result: descriptor are all parsed (#187)'to the Core Nodes test suite@functionrules are all parsed (previously every other rule was being silently dropped)resultpropertyDetails
This is a regression test for issue #187 where
@functionblocks containing aresult:descriptor caused subsequent@functionrules to be skipped during parsing. The test ensures the parser correctly handles multiple function rules in sequence without dropping any of them.https://claude.ai/code/session_01GRrZ5YkwVpAZqgxAt8sYM8