Skip to content

Remove Option Wrapper from Rule Precedence#69

Merged
ehwan merged 2 commits into
mainfrom
precedence
Jun 20, 2026
Merged

Remove Option Wrapper from Rule Precedence#69
ehwan merged 2 commits into
mainfrom
precedence

Conversation

@ehwan

@ehwan ehwan commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Description

This PR moves the “no precedence” state into core::rule::Precedence itself by adding Precedence::None, instead of representing rule precedence as Option<Precedence>.

Changes

  • Added Precedence::None and made it the default variant.
  • Changed production rule and parser table precedence fields from Option<Precedence> to Precedence.
  • Updated builder, deterministic parser, and nondeterministic parser logic to match on Precedence::None.
  • Updated parser code generation to serialize and decode Precedence::None.
  • Updated checked-in generated parser output and diff snapshots.

@ehwan ehwan self-assigned this Jun 20, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the Precedence representation by replacing Option<Precedence> with a direct Precedence enum that now includes a None variant. This change simplifies the codebase and eliminates unnecessary option wrapping across grammar building, parsing, and code emission modules. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@ehwan
ehwan merged commit cedc8ea into main Jun 20, 2026
1 check passed
@ehwan
ehwan deleted the precedence branch June 20, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant