Skip to content

Fix Bash heredoc attachment after opening statements - #178

Merged
zmaril merged 1 commit into
mainfrom
codex/bash-heredoc-attachment
Aug 22, 2026
Merged

Fix Bash heredoc attachment after opening statements#178
zmaril merged 1 commit into
mainfrom
codex/bash-heredoc-attachment

Conversation

@zmaril

@zmaril zmaril commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Closes #164.

Moves heredoc payload parsing to the statement terminator, so the complete opening redirect, list, or pipeline is parsed before the body becomes valid. The external scanner now queues multiple pending delimiters and serializes that state for incremental parsing.

Regression coverage includes trailing redirects, pipelines, semicolon-separated commands, empty bodies, indented heredocs, and multiple queued heredocs.

Validated with the pinned Tree-sitter 0.26.12 corpus tests, Bash negative/roles/lint gates, sweep smoke, workspace tests, Bash WASM check, and 15 incremental edits with zero fresh/incremental divergences.

@zmaril
zmaril merged commit 2648103 into main Aug 22, 2026
32 checks passed
@zmaril
zmaril deleted the codex/bash-heredoc-attachment branch August 22, 2026 13:38
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.

bash: heredoc body swallows the rest of the << line

1 participant