You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,38 @@
2
2
3
3
SwiftSyntaxSugar is a library that provides syntactic sugar and helpful extensions for [SwiftSyntax](https://github.com/swiftlang/swift-syntax). The purpose of this library is to improve the readability and maintainability of code written using SwiftSyntax.
4
4
5
+
-[Example](#example)
6
+
-[Installation](#installation)
7
+
-[License](#license)
8
+
9
+
## Example
10
+
11
+
<tablestyle="width: 100%; table-layout: fixed;">
12
+
<tr>
13
+
<td> With <code>SwiftSyntaxSugar</code> </td>
14
+
<td> Without <code>SwiftSyntaxSugar</code> </td>
15
+
</tr>
16
+
<tr>
17
+
<tdstyle="width: 50%;">
18
+
19
+
```swift
20
+
protocolDeclaration.isActorConstrained
21
+
```
22
+
23
+
</td>
24
+
<tdstyle="width: 50%;">
25
+
26
+
```swift
27
+
let isProtocolActorConstrained = protocolDeclaration.inheritanceClause?.inheritedTypes.contains { inheritedType in
28
+
let identifierType = inheritedType.type.as(IdentifierTypeSyntax.self)
0 commit comments