- Proposal: SE-0200
- Author: John Holdsworth, Brent Royal-Gordon, Erica Sadun
- Review Manager: Doug Gregor
- Status: Returned for revision
- Implementation: apple/swift#17668
- Bugs: SR-6362 Needs Update for New Design
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Multi-line string proposals | |
// https://github.com/apple/swift/pull/2275 | |
// swift-evolution thread: | |
// http://thread.gmane.org/gmane.comp.lang.swift.evolution/904/focus=15133 | |
// These examples should load in the prototype toolchain available here: | |
// http://johnholdsworth.com/swift-LOCAL-2016-05-09-a-osx.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let bookTuples = [(1, "john", "book", "novel", 9.99, ["chapt1", "chapt2"]), | |
(2, "john", "book", "novel", 9.99, ["chapt1", "chapt2"])] | |
// leaves blank line when there are no values in the list | |
let json1 = """ | |
{ | |
"catalog": [ | |
\(bookTuples.map { | |
(id, author, title, genre, price, chapters) in """ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case '"': | |
return lexStringLiteral(Token::StringModifiers(0)); | |
case '\'': | |
return lexChar(); | |
case '`': | |
return lexEscapedIdentifier(); | |
} | |
} | |
void Lexer::lexChar() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/include/swift/AST/KnownIdentifiers.def b/include/swift/AST/KnownIdentifiers.def | |
index 5222c7f12e..6f6b921841 100644 | |
--- a/include/swift/AST/KnownIdentifiers.def | |
+++ b/include/swift/AST/KnownIdentifiers.def | |
@@ -145,6 +145,7 @@ IDENTIFIER(nilLiteral) | |
IDENTIFIER(integerLiteral) | |
IDENTIFIER_(builtinIntegerLiteral) | |
IDENTIFIER(codepointLiteral) | |
+IDENTIFIER(characterLiteral) | |
IDENTIFIER_(MaxBuiltinFloatType) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First, install InjectionIII.app from the Mac AppStore | |
// https://apps.apple.com/us/app/injectioniii/id1380446739?mt=12 | |
// Make these changes to your code: | |
// add the following to application(didFinishLaunchingWithOptions:) | |
#if DEBUG | |
Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle")?.load() | |
#endif |
InjectionIII is an app available that provides "code injection" functionality allowing you to update the implementation of functions, memeber function and SwiftUI content body properties without having to restart your application. This can be useful to iterate over code or design without having to rebuild and restart your application continuously.
https://github.com/johnno1962/InjectionIII
Part of the implementation of injection is that it requires a user to add the following line somewhere in their code:
Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle")?.load()