Skip to content

Strip leading escaped newlines from macro tokens - #3525

Open
bogusyogi wants to merge 2 commits into
rust-lang:mainfrom
bogusyogi:codex/3512-macro-continuations
Open

bogusyogi wants to merge 2 commits into
rust-lang:mainfrom
bogusyogi:codex/3512-macro-continuations

Conversation

@bogusyogi

Copy link
Copy Markdown

Libclang may include an escaped newline at the start of a token when the next line starts without indentation. Strip leading LF/CRLF continuations before macro callbacks & cexpr consume those tokens, preserving literal interiors.

Adds the Zend expression from #3512, an indented closing-token control & split identifier, plus byte-level normalization tests. The Zend constant now emits 268435539. Fixes #3512.

Validation at 1d54e596eaebbfd28de12c92acd094de6a868d66: token unit test & all 16 macro-filtered integration tests passed (fork job).

Prepared with AI assistance.

This branch has not been deployed

No deployments
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.

Macro parser fails to strip \ before line not starting with whitespace

1 participant