feat(parser): add boolean shorthand expressions - #83
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 (9)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe grammar now parses unary and binary shorthand expressions with precedence and composition rules. Tree-sitter node definitions and C# syntax bindings expose their operators and operands. Corpus and binding tests cover valid, nested, composed, and malformed expressions. ChangesBoolean shorthand expressions
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The PR adds boolean shorthand parsing and typed syntax nodes with passing parser and C# test validation; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Source
participant TreeSitterParser
participant ExpressifSyntax
participant SyntaxBindingTests
Source->>TreeSitterParser: parse unary or binary shorthand
TreeSitterParser->>ExpressifSyntax: provide expression CST nodes
ExpressifSyntax->>SyntaxBindingTests: expose bound operators and operands
SyntaxBindingTests->>SyntaxBindingTests: verify structure and malformed-input recovery
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 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
!as lossless shorthand syntax for the existingnotfunction|AND,|OR, and|XORas left-associative shorthand syntax for the existing boolean functionsValidation
npm exec tree-sitter test -- --file-name boolean-shorthands.txt(18/18 passed)dotnet test bindings/csharp/Expressif.Syntax.Tests/Expressif.Syntax.Tests.csproj --no-restore --nologo -f net8.0 -p:NuGetAudit=false -p:TargetFrameworks=net8.0(146/146 passed)Closes #38
Closes #39
Closes #40
Summary by CodeRabbit
New Features
!operator.|AND,|OR, and|XOR.Bug Fixes