GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(parser): add boolean shorthand expressions by Seddryck · Pull Request #83 · Seddryck/Expressif.Syntax

Conversation

@Seddryck

@Seddryck Seddryck commented Aug 18, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Owner

Summary

  • parse ! as lossless shorthand syntax for the existing not function
  • parse |AND, |OR, and |XOR as left-associative shorthand syntax for the existing boolean functions
  • support grouping with the existing parenthesized-expression syntax
  • expose typed unary, binary, and operator syntax nodes without semantic lowering
  • add valid, composed, grouped, whitespace, and malformed-input coverage

Validation

  • 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

    • Added unary shorthand expressions using the ! operator.
    • Added binary shorthand expressions using |AND, |OR, and |XOR.
    • Supports nesting, precedence, associativity, parentheses, pipelines, function arguments, and generic operands.
  • Bug Fixes

    • Improved parsing and error recovery for incomplete, malformed, or unsupported shorthand expressions.
    • Updated parameterized-expression error reporting for missing separators.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Seddryck
feat(parser): add boolean shorthand expressions
7652f7d
@coderabbitai

coderabbitai Bot commented Aug 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 02ef9317-2bfd-4c38-91b3-ad86517c376a

📥 Commits

Reviewing files that changed from the base of the PR and between a6484e1 and 0752f73.

📒 Files selected for processing (9)
  • bindings/csharp/Expressif.Syntax.Tests/SyntaxBindingTests.cs
  • bindings/csharp/Expressif.Syntax/ExpressifSyntax.cs
  • bindings/csharp/Expressif.Syntax/SyntaxNodes.cs
  • grammar.js
  • src/grammar.json
  • src/node-types.json
  • src/parser.c
  • test/corpus/boolean-shorthands.txt
  • test/corpus/parameterized_expressions.txt

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Boolean shorthand expressions

Layer / File(s) Summary
Expression grammar and node model
grammar.js, src/grammar.json, src/node-types.json
Adds !, `
C# syntax binding
bindings/csharp/Expressif.Syntax/SyntaxNodes.cs, bindings/csharp/Expressif.Syntax/ExpressifSyntax.cs
Adds unary and binary syntax kinds and node classes. Binds operators and recursive operands from Tree-sitter expression nodes.
Parsing and binding validation
test/corpus/boolean-shorthands.txt, bindings/csharp/Expressif.Syntax.Tests/SyntaxBindingTests.cs, test/corpus/parameterized_expressions.txt
Adds coverage for expression structure, precedence, associativity, composition, spans, child ordering, malformed input, and parser recovery.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to 0752f

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
Loading

Possibly related PRs

  • Seddryck/Expressif.Syntax#2: Introduces the expression grammar and syntax-binding structure extended by this PR.
  • Seddryck/Expressif.Syntax#33: Adds expression contexts that this PR extends for shorthand arguments.
  • Seddryck/Expressif.Syntax#63: Also modifies composed expression parsing and C# syntax-binding tests.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Issues [#38] and [#39] are addressed, but [#40] requires a dedicated curly-brace grouping node that the changes do not add or test. Add explicit grouped-expression CST nodes for curly-brace grouping, update bindings and node types, and add the required grouping and disambiguation tests.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: parser support for boolean shorthand expressions.
Out of Scope Changes check ✅ Passed The changes remain focused on boolean shorthand parsing, syntax binding, CST definitions, parser recovery, and related tests.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/boolean-shorthand-expressions

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Seddryck
Seddryck marked this pull request as ready for review August 18, 2026 12:58
@Seddryck
fix(parser): preserve established recovery trees
0752f73
@Seddryck
Seddryck merged commit 6fd55c0 into main Aug 18, 2026
26 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai coderabbitai Bot mentioned this pull request Aug 19, 2026
feat(parser): support negated predicates and private record fields #92
Merged
This was referenced Aug 19, 2026
chore: Bump Expressif.Syntax from 0.9.0 to 0.20.0 Seddryck/Expressif.LanguageServer#34
Closed
chore: Bump Expressif.Syntax from 0.9.0 to 0.21.0 Seddryck/Expressif.LanguageServer#36
Closed
chore: Bump Expressif.Syntax from 0.9.0 to 0.22.0 Seddryck/Expressif.LanguageServer#38
Closed
This was referenced Aug 26, 2026
chore: Bump Expressif.Syntax from 0.9.0 to 0.28.0 Seddryck/Expressif.LanguageServer#40
Closed
chore: Bump Expressif and Expressif.Syntax Seddryck/Expressif.LanguageServer#41
Closed
chore: Bump Expressif.Syntax from 0.9.0 to 0.29.0 Seddryck/Expressif.LanguageServer#42
Closed
chore: Bump Expressif and Expressif.Syntax Seddryck/Expressif.LanguageServer#43
Closed
chore: Bump Expressif.Syntax from 0.9.0 to 0.32.0 Seddryck/Expressif.LanguageServer#44
Closed
chore: Bump Expressif and Expressif.Syntax Seddryck/Expressif.LanguageServer#45
Closed
chore: Bump Expressif.Syntax from 0.9.0 to 0.32.0 Seddryck/Expressif.LanguageServer#46
Closed
@dependabot dependabot Bot mentioned this pull request Sep 2, 2026
chore: Bump Expressif and Expressif.Syntax Seddryck/Expressif.LanguageServer#47
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Implement grouped expressions for boolean shorthands Implement binary shorthand expressions Implement unary shorthand expressions

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Seddryck
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.