Skip to content

Parser: stop body loop slurping sibling fn decls#171

Merged
danieljohnmorris merged 1 commit into
mainfrom
fix/sibling-helper-slurp
May 12, 2026
Merged

Parser: stop body loop slurping sibling fn decls#171
danieljohnmorris merged 1 commit into
mainfrom
fix/sibling-helper-slurp

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

When a function ends in a bare call and the next declaration starts, the parser used to swallow the next function's identifier as a call arg. Now the body loop checks for function-declaration headers strictly (Ident followed by > before the next ;/EOF, ruling out record-construction false-positives) and stops the body at that boundary. Cross-engine tests + example.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/parser/mod.rs 87.50% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@danieljohnmorris danieljohnmorris force-pushed the fix/sibling-helper-slurp branch 5 times, most recently from d251445 to 20a21fc Compare May 12, 2026 00:12
tests + example covering sibling helper case.
@danieljohnmorris danieljohnmorris force-pushed the fix/sibling-helper-slurp branch from 20a21fc to 58f4dc5 Compare May 12, 2026 00:13
@danieljohnmorris danieljohnmorris merged commit ec73111 into main May 12, 2026
4 of 5 checks passed
@danieljohnmorris danieljohnmorris deleted the fix/sibling-helper-slurp branch May 12, 2026 09:05
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