Skip to content

Conversation

epage
Copy link
Contributor

@epage epage commented Sep 4, 2025

This does not create any new productions, instead preferring comments.
#1974 will involve pulling out the horizontal
whitespace into a separate production.

Comment wording (and casing) is modeled off of
https://www.unicode.org/reports/tr31/#R3a.
I left off a "unicode" prefix for ASCII items as they are likely common
enough in that context that specifying them as "unicode" could cause
more confusion.

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Sep 4, 2025
@rustbot

This comment has been minimized.

| LINE_SEPARATOR
| PARAGRAPH_SEPARATOR

LINE_FEED -> U+000A
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than having duplicate productions like this (that we wouldn't want people to use elsewhere in the Reference), it'd perhaps work out better to simply comment the LF production with something like // Unicode character "LINE FEED (LF)"., so I've added support for comments in the grammar:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

that we wouldn't want people to use elsewhere in the Reference

In that case, maybe I should remove all productions that are not used elsewhere.

I also went with comment wording (and casing) to align with the unicode spec as much as possible.

This does not create any new productions, instead preferring comments.
rust-lang#1974 will involve pulling out the horizontal
whitespace into a separate production.

Comment wording (and casing) is modeled off of
https://www.unicode.org/reports/tr31/#R3a.
I left off a "unicode" prefix for ASCII items as they are likely common
enough in that context that specifying them as "unicode" could cause
more confusion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants