Skip to content

fix(awk): support backslash-newline line continuation#841

Merged
chaliy merged 1 commit intomainfrom
fix/issue-836-awk-backslash-newline
Mar 26, 2026
Merged

fix(awk): support backslash-newline line continuation#841
chaliy merged 1 commit intomainfrom
fix/issue-836-awk-backslash-newline

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 26, 2026

Summary

  • Backslash immediately before a newline is now treated as line continuation in awk programs
  • The two characters are removed and physical lines are joined into one logical line
  • This is standard POSIX awk behavior

Test plan

  • awk_backslash_newline_continuation — basic line continuation in expression
  • awk_backslash_newline_condition — line continuation in condition
  • All 118 awk spec tests pass
  • All 1748 bash spec tests pass
  • cargo fmt --check and cargo clippy clean

Closes #836

Backslash immediately before a newline is now treated as line
continuation in awk programs — the two characters are removed and
the physical lines are joined. This is standard POSIX awk behavior.

Closes #836
@chaliy chaliy force-pushed the fix/issue-836-awk-backslash-newline branch from cedf9a7 to d79f001 Compare March 26, 2026 17:24
@chaliy chaliy merged commit 7c55818 into main Mar 26, 2026
18 of 23 checks passed
@chaliy chaliy deleted the fix/issue-836-awk-backslash-newline branch March 26, 2026 17:30
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.

bug: awk parser doesn't support backslash-newline line continuation

1 participant