<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">#source is already earmarked for future directions.<div class=""><br class=""></div><div class="">I'm thinking #setline and #sourceline are both good.<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 3, 2016, at 6:58 PM, Sean Heber <<a href="mailto:sean@fifthace.com" class="">sean@fifthace.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">I like that reasoning. I'd suggest even simpler and go with #source since it also can include a file name.</div><div class=""><br class=""></div><div class="">l8r</div><div class="">Sean<br class=""><br class="">Sent from my iPad</div><div class=""><br class="">On Feb 3, 2016, at 7:32 PM, Jonathan Tang via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class="">The primary use for the existing #line directive is for generated code like parser/lexer generators, right? If so, how about #sourceline, since it represents the line number in the original source code? I'm also fine with #setline, but don't like #linenumber because it's not clear what the difference is between it and #line.<div class=""><br class=""></div><div class="">Actually, it'd also be used to reset the line number back to the generated code, right? In that case, #sourceline seems awkward, and maybe I'll just go with +1 to #setline.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Feb 3, 2016 at 5:24 PM, Erica Sadun via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Swift Evolution SE-0028 (<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0028-modernizing-debug-identifiers.md" target="_blank" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0028-modernizing-debug-identifiers.md</a>) overloads<div class="">the use of #line to mean both an identifier that maps to a calling site's line number with a file and acts as part of a line control statement with the following grammar:<br class=""><div class=""><br class=""><div class=""><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;font-family:Helvetica,Arial,sans-serif" class=""><span style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(128,128,128);font-style:italic" class="">line-control-statement </span><span style="border:0px;margin:0px;outline:0px;padding:0px 0px 0px 4px;vertical-align:baseline;color:rgb(128,128,128)" class="">→ </span><code style="border:0px;font-size:0.86em;margin:0px;outline:0px;padding:0px 4px;vertical-align:baseline;font-family:Menlo,monospace;font-weight:600;word-wrap:break-word" class="">#line</code></div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;font-family:Helvetica,Arial,sans-serif" class=""><a name="-1767850345_//apple_ref/doc/uid/TP40014097-CH38-NoLink_926" style="border:0px;outline:0px;padding:85px 0px 0px;vertical-align:baseline;display:block;width:0px;min-height:0px;color:rgb(0,136,204)" class=""></a><span style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(128,128,128);font-style:italic" class="">line-control-statement </span><span style="border:0px;margin:0px;outline:0px;padding:0px 0px 0px 4px;vertical-align:baseline;color:rgb(128,128,128)" class="">→ </span><code style="border:0px;font-size:0.86em;margin:0px;outline:0px;padding:0px 4px;vertical-align:baseline;font-family:Menlo,monospace;font-weight:600;word-wrap:break-word" class="">#line</code><span style="border:0px;margin:0px;outline:0px;padding:0px 4px;vertical-align:baseline;font-style:italic;word-break:keep-all" class=""><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html#//apple_ref/swift/grammar/line-number" style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(0,136,204);text-decoration:none" target="_blank" class="">line-number</a></span><span style="border:0px;margin:0px;outline:0px;padding:0px 4px;vertical-align:baseline;font-style:italic;word-break:keep-all" class=""><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html#//apple_ref/swift/grammar/file-name" style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(0,136,204);text-decoration:none" target="_blank" class="">file-name</a></span></div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;font-family:Helvetica,Arial,sans-serif" class=""><a name="-1767850345_//apple_ref/doc/uid/TP40014097-CH38-NoLink_927" style="border:0px;outline:0px;padding:85px 0px 0px;vertical-align:baseline;display:block;width:0px;min-height:0px;color:rgb(0,136,204)" class=""></a><span style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(128,128,128);font-style:italic" class="">line-number </span><span style="border:0px;margin:0px;outline:0px;padding:0px 0px 0px 4px;vertical-align:baseline;color:rgb(128,128,128)" class="">→ </span><span style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline" class="">A decimal integer greater than zero</span></div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;font-family:Helvetica,Arial,sans-serif" class=""><a name="-1767850345_//apple_ref/doc/uid/TP40014097-CH38-NoLink_928" style="border:0px;outline:0px;padding:85px 0px 0px;vertical-align:baseline;display:block;width:0px;min-height:0px;color:rgb(0,136,204)" class=""></a><span style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(128,128,128);font-style:italic" class="">file-name </span><span style="border:0px;margin:0px;outline:0px;padding:0px 0px 0px 4px;vertical-align:baseline;color:rgb(128,128,128)" class="">→ </span><span style="border:0px;margin:0px;outline:0px;padding:0px 4px;vertical-align:baseline;font-style:italic;word-break:keep-all" class=""><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/swift/grammar/static-string-literal" style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(0,136,204);text-decoration:none" target="_blank" class="">static-string-literal</a></span></div></div></div></div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;font-family:Helvetica,Arial,sans-serif" class=""><br class=""></div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline" class="">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. </div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline" class=""><br class=""></div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline" class="">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."</div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline" class=""><br class=""></div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline" class="">I'd recommend <font face="Menlo" class="">#setline</font> or <font face="Menlo" class="">#linenumber</font>. Starting this thread to solicit other suggestions.</div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline" class=""><br class=""></div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline" class="">Best, -- E</div><div style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline" class=""><br class=""></div></div><br class="">_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote></div></div></blockquote></div><br class=""></div></div></body></html>