Skip to content

Convert long paragraph to list - #9370

Open
tkoeppe wants to merge 1 commit into
cplusplus:mainfrom
tkoeppe:lexitem
Open

tkoeppe wants to merge 1 commit into
cplusplus:mainfrom
tkoeppe:lexitem

Conversation

@tkoeppe

@tkoeppe tkoeppe commented Oct 24, 2026

Copy link
Copy Markdown
Contributor
image

@tkoeppe
tkoeppe requested a review from jensmaurer October 24, 2026 21:00
Comment thread source/lex.tex
Comment on lines +557 to +570
\begin{itemize}
\item header names;
\item placeholder tokens produced by preprocessing \tcode{import}
and \tcode{module} directives
(\grammarterm{import-keyword}, \grammarterm{module-keyword},
and \grammarterm{export-keyword});
\item identifiers;
\item preprocessing numbers;
\item character literals (including user-defined character literals);
\item string literals (including user-defined string literals);
\item preprocessing operators and punctuators;
\item single non-whitespace characters that do not lexically
match the other preprocessing token categories.
\end{itemize}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel like this would be cleaner if you used the \item-on-separate-line form here:

Suggested change
\begin{itemize}
\item header names;
\item placeholder tokens produced by preprocessing \tcode{import}
and \tcode{module} directives
(\grammarterm{import-keyword}, \grammarterm{module-keyword},
and \grammarterm{export-keyword});
\item identifiers;
\item preprocessing numbers;
\item character literals (including user-defined character literals);
\item string literals (including user-defined string literals);
\item preprocessing operators and punctuators;
\item single non-whitespace characters that do not lexically
match the other preprocessing token categories.
\end{itemize}
\begin{itemize}
\item
header names;
\item
placeholder tokens produced by preprocessing \tcode{import} and \tcode{module} directives
(\grammarterm{import-keyword}, \grammarterm{module-keyword}, and \grammarterm{export-keyword});
\item
identifiers;
\item
preprocessing numbers;
\item
character literals
(including user-defined character literals);
\item
string literals
(including user-defined string literals);
\item
preprocessing operators and punctuators;
\item
single non-whitespace characters
that do not lexically match the other preprocessing token categories.
\end{itemize}

It's just more maintainable that way and the semantic line breaks come out cleaner. Perhaps we could also add some forward references here. We mention "string literals" which are described in subsequent subclause [lex.string], but don't provide a forward reference. That would make each item longer as well and justify having multiple lines for more \items.

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