Skip to content

[lex.phases] Move dropping whitespace to end of phase 4#8117

Merged
jensmaurer merged 1 commit into
cplusplus:mainfrom
AlisdairM:move_dropping_whitespace
Oct 12, 2025
Merged

[lex.phases] Move dropping whitespace to end of phase 4#8117
jensmaurer merged 1 commit into
cplusplus:mainfrom
AlisdairM:move_dropping_whitespace

Conversation

@AlisdairM
Copy link
Copy Markdown
Contributor

Phase 7 deals only with tokens, not whitespace. For clarity move the dropping of whitespace to the end of phase 4, after preprocessing directives are deleted. Newline characters are significant in the grammar of preprocessing directives to whitespace characters are clearly signicant until this point. Conversely, it is good to recognise that string literal preprocessing tokens are adjacted regardless of whitespace in phases 5 and 6.

Comment thread source/lex.tex Outdated
Phase 7 deals only with tokens, not whitespace.  For clarity
move the dropping of whitespace to the end of phase 4, after
preprocessing directives are deleted.  Newline characters are
significant in the grammar of preprocessing directives to
whitespace characters are clearly signicant until this point.
Conversely, it is good to recognise that string literal
preprocessing tokens are adjacted regardless of whitespace
in phases 5 and 6.
@AlisdairM AlisdairM force-pushed the move_dropping_whitespace branch from 4099a09 to 8322e95 Compare July 25, 2025 12:38
@AlisdairM AlisdairM requested a review from jensmaurer July 27, 2025 20:58
@tkoeppe
Copy link
Copy Markdown
Contributor

tkoeppe commented Aug 14, 2025

Final thoughts, @jensmaurer?

@jensmaurer
Copy link
Copy Markdown
Member

This is not a technical concern, but more a social one. I've sent e-mail to the core reflector so people are aware of the move. Let's merge on Monday, unless there are objections.

@AlisdairM
Copy link
Copy Markdown
Contributor Author

Is this ready to land?

Copy link
Copy Markdown
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

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

This is ok.

@jensmaurer jensmaurer merged commit adca52b into cplusplus:main Oct 12, 2025
2 checks passed
@AlisdairM AlisdairM deleted the move_dropping_whitespace branch October 25, 2025 16:31
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.

3 participants