Skip to content

Commit 4099a09

Browse files
committed
[lex.phases] Move dropping whitespace to end of phase 4
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.
1 parent c07c130 commit 4099a09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/lex.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
expanded\iref{cpp.replace}, and \tcode{_Pragma} unary operator expressions are executed\iref{cpp.pragma.op}.
166166
A \tcode{\#include} preprocessing directive\iref{cpp.include} causes the named header or
167167
source file to be processed from phase 1 through phase 4, recursively.
168+
Whitespace characters separating preprocessing tokens are no longer significant.
168169
All preprocessing directives are then deleted.
169170

170171
\item
@@ -180,7 +181,6 @@
180181

181182
\item
182183
Each preprocessing token is converted into a token\iref{lex.token}.
183-
Whitespace characters separating tokens are no longer significant.
184184
The resulting tokens constitute a \defn{translation unit} and
185185
are syntactically and
186186
semantically analyzed as a \grammarterm{translation-unit}\iref{basic.link} and

0 commit comments

Comments
 (0)