Skip to content

Commit 969bd91

Browse files
authored
Added a Trying it out section
1 parent ff6b443 commit 969bd91

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ See [Declarative String Processing Overview][decl-string]
1010

1111
- [Swift Trunk Development Snapshot](https://www.swift.org/download/#snapshots) DEVELOPMENT-SNAPSHOT-2022-03-09 or later.
1212

13+
## Trying it out
14+
15+
To try out the functionality provided here, download the latest open source development toolchain. Import `_StringProcessing` in your source file to get access to the API and specify `-Xfrontend -enable-experimental-string-processing` to get access to the literals.
16+
17+
For example, in a `Package.swift` file's target declaration:
18+
19+
```swift
20+
.target(
21+
name: "foo",
22+
dependencies: ["depA"],
23+
swiftSettings: [.unsafeFlags(["-Xfrontend", "-enable-experimental-string-processing"])]
24+
),
25+
```
26+
27+
1328
## Integration with Swift
1429

1530
`_RegexParser` and `_StringProcessing` are specially integrated modules that are built as part of apple/swift.

0 commit comments

Comments
 (0)