<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="">1. impressed.<div class="">2. gist revised: <a href="https://gist.github.com/erica/016f44258586aaf13b5c" class="">https://gist.github.com/erica/016f44258586aaf13b5c</a></div><div class=""><br class=""></div><div class="">-- E</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 22, 2016, at 3:04 PM, Jack Lawrence via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I also use it in a similar way in playgrounds to inject some hidden preamble code and then rewrite the location of diagnostics.<div class=""><br class=""></div><div class="">Jack<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 22, 2016, at 1:48 PM, Jordan Rose <<a href="mailto:jordan_rose@apple.com" class="">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">It's mainly used by LLDB to make sure user-visible line numbers make sense even in the presence of textually-inserted code.</div><div class=""><br class=""></div><div class="">Jordan</div><div class=""><br class=""></div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 22, 2016, at 13:43, Jack Lawrence via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Indeed. Here’s the grammar from TSPL:<div class=""><br class=""></div><div class=""><div style="border: 0px; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; font-family: Helvetica, Arial, sans-serif;" class=""><span class="syntax-def-name" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">line-control-statement </span><span class="arrow" style="border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><code class="literal" 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;">#line</code></div><div style="border: 0px; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; font-family: Helvetica, Arial, sans-serif;" class=""><a name="//apple_ref/doc/uid/TP40014097-CH38-NoLink_926" style="border: 0px; margin: -85px 0px 0px; outline: 0px; padding: 85px 0px 0px; vertical-align: baseline; display: block; width: 0px; height: 0px; color: rgb(0, 136, 204);" class=""></a><span class="syntax-def-name" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">line-control-statement </span><span class="arrow" style="border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><code class="literal" 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;">#line</code><span class="syntactic-cat" style="border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html#//apple_ref/swift/grammar/line-number" data-renderer-version="2" data-id="//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;" class="">line-number</a></span><span class="syntactic-cat" style="border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html#//apple_ref/swift/grammar/file-name" data-renderer-version="2" data-id="//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;" class="">file-name</a></span></div><div style="border: 0px; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; font-family: Helvetica, Arial, sans-serif;" class=""><a name="//apple_ref/doc/uid/TP40014097-CH38-NoLink_927" style="border: 0px; margin: -85px 0px 0px; outline: 0px; padding: 85px 0px 0px; vertical-align: baseline; display: block; width: 0px; height: 0px; color: rgb(0, 136, 204);" class=""></a><span class="syntax-def-name" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">line-number </span><span class="arrow" style="border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><span class="text-description" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">A decimal integer greater than zero</span></div><div style="border: 0px; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; font-family: Helvetica, Arial, sans-serif;" class=""><a name="//apple_ref/doc/uid/TP40014097-CH38-NoLink_928" style="border: 0px; margin: -85px 0px 0px; outline: 0px; padding: 85px 0px 0px; vertical-align: baseline; display: block; width: 0px; height: 0px; color: rgb(0, 136, 204);" class=""></a><span class="syntax-def-name" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">file-name </span><span class="arrow" style="border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><span class="syntactic-cat" style="border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/swift/grammar/static-string-literal" data-renderer-version="2" data-id="//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;" class="">static-string-literal</a></span></div><div style="border: 0px; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; font-family: Helvetica, Arial, sans-serif;" class=""><span class="syntactic-cat" style="border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><br class=""></span></div><div class=""><blockquote type="cite" class=""><div class="">On Jan 22, 2016, at 1:39 PM, Chris Lattner <<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><blockquote type="cite" class="">On Jan 22, 2016, at 12:20 PM, Jack Lawrence via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class="">`#line` already exists in the language, how will you deal with this?<br class=""></blockquote><br class="">It does?<br class=""><br class="">-Chris<br class=""><br class=""></div></div></blockquote></div><br class=""></div></div>_______________________________________________<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" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>