Skip to content

fix: recognize keywords across long line continuations - #23

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

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

Conversation

@everton-dgn

Copy link
Copy Markdown

A reserved word split by enough escaped newlines can exceed the lexer's physical length cutoff. For example, if with eight continuations is parsed as a command instead of an if statement.

Remove that cutoff when materializing an eligible non-raw word. The logical keyword length check and the guards for quoting and expansions remain in place. The new cases cover the old boundary, longer continuations, offsets and non-keyword controls, with Bash checking syntax and execution before and after printing.

Validation: all 2,075 tests passed on Node 24, and the 16 focused tests passed as compiled JavaScript on Node 20. Build, type checks, lint, formatting and the Node 24 runtime smoke passed. The Node 14 smoke could not run locally because the available binary is x86_64 and this host is arm64; that CI check remains outstanding.

A reserved word split by enough escaped newlines can exceed the lexer's physical length cutoff. For example, `if` with eight continuations is parsed as a command instead of an if statement.

Remove that cutoff when materializing an eligible non-raw word. The logical keyword length check and the guards for quoting and expansions remain in place. The new cases cover the old boundary, longer continuations, offsets and non-keyword controls, with Bash checking syntax and execution before and after printing.

Validation: all 2,075 tests passed on Node 24, and the 16 focused tests passed as compiled JavaScript on Node 20. Build, type checks, lint, formatting and the Node 24 runtime smoke passed. The Node 14 smoke could not run locally because the available binary is x86_64 and this host is arm64; that CI check remains outstanding.
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