test(treesitter): honor both supported parser fixtures - #35
metaphorics merged 2 commits into
Conversation
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
This PR successfully updates the tree-sitter test fixture to support both Lua and C parsers. The implementation correctly selects language-specific source code and node types, and adds appropriate error checking with assert(not root:has_error()). All original assertions are preserved while fixing the C parser compatibility issue. The changes are well-structured and maintain test coverage.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
…03-parser-fixture-contract
|
@codex review |
|
/q review |
There was a problem hiding this comment.
The changes correctly address the parser fixture contract issue by adding language-specific handling for both Lua and C parsers. The test now properly selects appropriate source code and node types based on the parser language, maintaining all original assertions while ensuring compatibility with both grammars.
Key improvements:
- Conditional source and node type selection based on parser language
- Added syntax error assertion to verify valid parse trees
- Updated comment accuracy for multi-grammar support
The implementation is sound with no blocking defects identified.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Parser fixture contract
This layer follows PR #34. It changes a test fixture, not the tree-sitter
implementation or its expected highlighting behavior.
The test helper accepts either a Lua or C parser. The highlight regression
nevertheless always parsed Lua source and queried Lua's
numberandchunknodes. With a real C parser, it failed before reaching any highlight assertion:
Invalid node type "number".The fixture now selects valid source and node names for the selected grammar.
Both sources place
valueat columns 6 through 11 and span two rows. Allassertions remain: capture count, hidden-group filtering, buffer and namespace
IDs, exact coordinates, default priority, explicit priority, and root range.
An additional assertion rejects a syntax-error tree.
Validation used tree-sitter-c v0.24.2, built from the archive whose SHA-256 is
2eeb4db31f8fa0865e45488503d13403923bcb485a1bdb637abff8c42dd97364.The complete workspace command was:
Result: 3,470 tests ran; 3,469 passed and one failed. One further test was
skipped by the existing configuration. The failure is
differential::perf_contract::steady_state_workloads_are_state_neutral, whoserequired
.references/neovim/build/bin/nvimbinary is absent. The test wasnot bypassed or changed. This is not a passing full-workspace gate or a
completed performance comparison.