Skip to content

Preserve multiline inline if chains#150

Merged
adamcavendish merged 1 commit into
mainfrom
adamcavendish/inline-if-followup-audit
Jun 21, 2026
Merged

Preserve multiline inline if chains#150
adamcavendish merged 1 commit into
mainfrom
adamcavendish/inline-if-followup-audit

Conversation

@adamcavendish

@adamcavendish adamcavendish commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve source newlines before inline $if where they represent multiline inline fragments
  • keep inline $else_if / $else attached when chains span source lines
  • retain assignment-continuation collapse for value expressions like const mode =\n $if(...)
  • add exact coverage for pipe continuations, multiline siblings, split chains, comma guards, and import tracking
  • fix inline-control-flow example wording about evaluation timing

Verification

  • cargo test
  • just lint
  • cargo fmt --check
  • git diff --check
  • cargo run --example inline_control_flow

- keep inline `$else_if` and `$else` tails attached across source newlines
- preserve multiline `$if` fragment newlines without changing assignment continuations
- add regression coverage for split chains, pipe continuations, comma guards, and import tracking
- correct inline-control-flow example wording
@adamcavendish adamcavendish force-pushed the adamcavendish/inline-if-followup-audit branch from d1f85ad to 0f3f760 Compare June 21, 2026 13:16
@adamcavendish adamcavendish merged commit bcc739f into main Jun 21, 2026
5 checks passed
@adamcavendish adamcavendish deleted the adamcavendish/inline-if-followup-audit branch June 21, 2026 13:17
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