Skip to content

fix: recognize operators across line continuations - #25

Open
everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/recognize-operators-across-line-continuations
Open

everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/recognize-operators-across-line-continuations

Conversation

@everton-dgn

Copy link
Copy Markdown

Bash removes backslash-newline pairs before recognizing operators. Splitting an operator across lines could make unbash read it as separate tokens or a different redirection.

Skip continuations while looking ahead for control and redirection operators, preserving physical source offsets. The regression cases check token spans, parsing and printing, with Bash as a syntax and behavior oracle.

The Node 24 suite passed 2,204 tests with 14 cases skipped because the host has Bash 3.2. The focused suite passed on Node 24 and compiled Node 20. A separate Bash 5.1.4 run covered 52 variants with 312 passing checks. Build, typecheck, lint and formatting passed; Node 14 was not run.

Bash removes backslash-newline pairs before recognizing operators. Splitting an operator across lines could make unbash read it as separate tokens or a different redirection.

Skip continuations while looking ahead for control and redirection operators, preserving physical source offsets. The regression cases check token spans, parsing and printing, with Bash as a syntax and behavior oracle.

The Node 24 suite passed 2,204 tests with 14 cases skipped because the host has Bash 3.2. The focused suite passed on Node 24 and compiled Node 20. A separate Bash 5.1.4 run covered 52 variants with 312 passing checks. Build, typecheck, lint and formatting passed; Node 14 was not run.
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