Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regen/HeaderParser: correctly handle backslash line continuations #22994

Closed
wants to merge 1 commit into from

Conversation

mauke
Copy link
Contributor

@mauke mauke commented Feb 12, 2025

C says that backslash-newline pairs should be deleted from the source before doing any parsing (like a source filter).

#def\
ine A\
B /\
* this is a comment *\
/ "\\
n"

is thus equivalent to

#define AB "\n"

(In particular, backslash-newline should never be replaced by a space.)


  • This set of changes does not require a perldelta entry.

C says that backslash-newline pairs should be deleted from the source
before doing any parsing (like a source filter).

    #def\
    ine A\
    B /\
    * this is a comment *\
    / "\\
    n"

is thus equivalent to

    #define AB "\n"

(In particular, backslash-newline should never be replaced by a space.)
@mauke mauke requested a review from demerphq February 12, 2025 10:43
Copy link
Collaborator

@demerphq demerphq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This MR as is fails tests, but I fixed them myself and pushed manually.

@demerphq
Copy link
Collaborator

This was merged manually, see cbc3360

Thanks!

@demerphq demerphq closed this Feb 12, 2025
@mauke mauke deleted the regen-headerparser-bs-linecont branch February 12, 2025 14:48
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.

2 participants