Skip to content

Commit 8322e95

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 7e6519e commit 8322e95

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
@@ -157,6 +157,7 @@
157157
A \tcode{\#include} preprocessing directive\iref{cpp.include} causes the named header or
158158
source file to be processed from phase 1 through phase 4, recursively.
159159
All preprocessing directives are then deleted.
160+
Whitespace characters separating preprocessing tokens are no longer significant.
160161

161162
\item
162163
For a sequence of two or more adjacent \grammarterm{string-literal} preprocessing tokens,
@@ -171,7 +172,6 @@
171172

172173
\item
173174
Each preprocessing token is converted into a token\iref{lex.token}.
174-
Whitespace characters separating tokens are no longer significant.
175175
The resulting tokens constitute a \defn{translation unit} and
176176
are syntactically and
177177
semantically analyzed as a \grammarterm{translation-unit}\iref{basic.link} and

0 commit comments

Comments
 (0)