New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-170] SE 0168 Multi-Line String Literals #42792
Comments
I filed a request for this a year ago as rdar://17923205 That rdar got duped to rdar://12574718 which remains open. I assume Apple folk have access to additional commentary under those #s |
Comment by Travis Tilley (JIRA) Access to said commentary would be quite helpful indeed. |
Info from Radar:
Info from me:
|
Comment by Travis Tilley (JIRA) Thank you very kindly for the information. In open source projects I tend to just implement things and since the work is already done it tends to get accepted without too much debate (or accepted after a maintainer tells me a better way to do it and I rewrite). I guess I can't get away with that here. 😉 I'll hop on the mailing lists and make sure everything is hashed out. |
Comment by Travis Tilley (JIRA) Just to note for anyone not following the discussion on the mailing list, that feedback is ongoing here: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001565.html |
Proof of concept PR raised showing Lexer changed required: #2275 |
The latest proposal: https://github.com/apple/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md The following PR implements it: |
Additional Detail from JIRA
md5: f0038de7dd719f443bd86f54945b80da
Issue Description:
I would very much like to implement python-style multi-line string literals in swift (not to be confused with slightly more complex heredoc style syntax). Strings would be started by a triple quote and ended by a triple quote, potentially with any consistent internal indentation stripped from the resulting string.
Something to the effect of:
Is there any interest, and if so is there any code I would need to touch outside of
lib/Parse/Lexer.cpp
? I only have a basic understanding of C++ and don't grok SourceKit in any way whatsoever.My main motivation is to make the use of DocOpt style command-line parsing significantly more pleasant. To see an example of what I mean, please check out http://docopt.org/
The text was updated successfully, but these errors were encountered: