Is it true that this feature is only for the purpose of debug symbols / compiler message locations? If so, what about including the word "debug", such as #debugline ?<br><div class="gmail_quote"><div dir="ltr">On Wed, Feb 3, 2016 at 7:29 PM Brent Royal-Gordon via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> line-control-statement → #line<br>
> line-control-statement → #lineline-numberfile-name<br>
> line-number → A decimal integer greater than zero<br>
> file-name → static-string-literal<br>
><br>
> The accepted implementation of SE-0028 disambiguates the two by requiring #line (the control statement) to appear at the first column for the time being. This is a stop-gap solution best remedied by renaming #line.<br>
><br>
> Chris Lattner writes, "The core team isn’t thrilled with the magic “first token on a line” whitespace behavior that #line will be getting, and would like someone to start a discussion about renaming the old #line directive to something more specific and tailored to its purpose. Once that name and syntax is settled, we can rename the directive and remove the whitespace rule."<br>
><br>
> I'd recommend #setline or #linenumber. Starting this thread to solicit other suggestions.<br>
<br>
I don't love the way the current format has two unlabeled parameters in an arbitrary order. Maybe something more like this?<br>
<br>
#reset line=50, file="foo.swift"<br>
<br>
(I have a soft preference for "reset" over "set" because these are things the compiler changes automatically, but that might be a silly reason.)<br>
<br>
Perhaps this could even let you set any combination of the #whatever parameters, so if, for instance, you were writing a parser generator, you could set #function to the name of the rule a particular piece of code came from.<br>
<br>
--<br>
Brent Royal-Gordon<br>
Architechies<br>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>