Skip to content

fix(parser): allow empty statements 🫥 - #582

Merged
timfennis merged 1 commit into
masterfrom
bugfix/empty-statements
Dec 2, 2026
Merged

timfennis merged 1 commit into
masterfrom
bugfix/empty-statements

Conversation

@timfennis

Copy link
Copy Markdown
Owner

A ; with no statement before it was a parse error, at the top level and in a block, so even print(1);; or a program of only ; was rejected with "Expected an expression but got ';' instead".

  • The parser now skips the ; of an empty statement before each statement, at the top level and in a block. It does nothing: { ; 5 } is still 5, and { 5; ; } is still ().
  • ndc fmt leaves empty statements out.

Written with AI (Claude Code), all of it.

🤖 Generated with Claude Code

Co-authored-by: Claude Opus 5.5 noreply@anthropic.com

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T06:38:29.816853Z 756de8b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@timfennis
timfennis force-pushed the bugfix/empty-statements branch from 756de8b to 645a2e7 Compare December 2, 2026 06:39
@timfennis
timfennis merged commit 8b69023 into master Dec 2, 2026
1 check passed
@timfennis
timfennis deleted the bugfix/empty-statements branch December 2, 2026 06:41
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