swiftlang / swift-book

The Swift Programming Language book

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change Reference of #line, #file, #file, #fileID, and #filePath from Literal Expressions to Freestanding Macro Expressions

tadbyt opened this issue · comments

Location

https://docs.swift.org/swift-book/documentation/the-swift-programming-language/expressions#Literal-Expression
https://docs.swift.org/swift-book/documentation/the-swift-programming-language/statements#Line-Control-Statement

Description

#line, #file, #file, #fileID, and #filePath are no longer special literals. They are freestanding macro expressions. The text should be revised accordingly.

Correction

Change the first sentence in the third paragraph to:

The first form of a line control statement changes the values of the #line, #file, #fileID, and #filePath freestanding macro expressions, beginning with the line of code following the line control statement.

The reference to the Literal Expression subsection should be removed and the note given after the first paragraph in the Literal Expression subsection should be included in its place.