[swift-evolution] [swift-evolution-announce] [Review[ SE-0034 Disambiguating Line Control Statements from Debugging Identifiers
aprantl at apple.com
Thu Feb 18 10:57:17 CST 2016
> Detailed design
> line-control-statement → #setline
> line-control-statement → #setline line-number file-name
> line-number → A decimal integer greater than zero
> file-name → static-string-literal
Nitpick: #setline is not really a statement, a better name for the production would be “line-control-directive” as it may appear everywhere a newline character may appear in the grammar.
I’d like to propose “#resetline” as a more self-explanatory alternative to the empty #setline directive. (The empty #line directive restores the the parser to continue with normal source locations — a feature used by LLDB).
> On Feb 17, 2016, at 8:39 PM, Chris Lattner <clattner at apple.com> wrote:
> * What is your evaluation of the proposal?
+1 with the above suggestions.
> * Is the problem being addressed significant enough to warrant a change to Swift?
Yes, we don’t want two different concepts named #line.
> * Does this proposal fit well with the feel and direction of Swift?
Yes, since it is a stated non-goal to maintain compatibility with the C preprocessor.
More information about the swift-evolution