fix: align C# value binding with grammar - #30
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe C# binding layer now supports variables, record access, array and tuple literals, record literals, and record fields. New syntax nodes expose selectors, quoting, nested values, and original-input state. Tests compare binder coverage with ChangesC# value binding
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to The PR expands C# value binding to match the grammar and adds coverage for supported syntax; reported tests pass, and no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant Grammar
participant BindValue
participant BindRecordAccess
participant RecordAccessSyntax
Grammar->>BindValue: provide record_access value node
BindValue->>BindRecordAccess: delegate record access binding
BindRecordAccess->>RecordAccessSyntax: create selectors and original-input state
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Summary
record_accessnodes, including current/original roots, named/positional selectors, and nested pathsvaluesubtype contract with the binder's declared coverage so future drift fails testsRoot cause and impact
The grammar and C# binder evolved independently. Tree-sitter could produce valid value nodes that
BindValuedid not recognize, causing successfully parsed expressions such as.nameto fail withExpressifBindingException. The C# syntax model now covers every value subtype exposed by the grammar.Validation
dotnet test bindings/csharp/Expressif.Syntax.Tests/Expressif.Syntax.Tests.csproj --nologo --no-restore -m:1— 48/48 passed on net8.0, net9.0, and net10.0tree-sitter test— all 78 inputs parsed; 72 snapshots passed and 6 pre-existing Windows CRLF/end-token snapshot differences remaingit diff --checkClose #29
Summary by CodeRabbit
New Features
Tests