Skip to content

shell/syntax: preserve call expr operand separators - #813

Merged
ewhauser merged 1 commit into
mainfrom
ewhauser/call-expr-separators
Mar 30, 2026
Merged

ewhauser merged 1 commit into
mainfrom
ewhauser/call-expr-separators

Conversation

@ewhauser

Copy link
Copy Markdown
Owner

Summary

  • add parse-time CallExprSeparator metadata for adjacent simple-command operands
  • expose ArgSeparator and OperandSeparator without changing the exported CallExpr struct shape
  • cover alias expansion, redirect boundaries, parse-only behavior, and document the contract in SPEC.md

Why

runRedundantSpacesInEchoRule needs to distinguish repeated horizontal spaces between adjacent argv words without reparsing raw source. Recording separator trivia during parsing makes that information available directly from the AST, including alias-expanded boundaries where source slicing is not reliable.

Validation

  • go test ./shell/syntax
  • go test ./shell/syntax/typedjson
  • make lint

@ewhauser
ewhauser merged commit 683f80e into main Mar 30, 2026
16 checks passed
@ewhauser
ewhauser deleted the ewhauser/call-expr-separators branch March 30, 2026 20:56
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