Commit 39d9077
committed
Apply DeMorgan's Law
created `ApplyDeMorganLaw` to provide code actions for generalised DeMorgan's conversion
- matches with the outermost applicable expression
- supports both logical and bitwise expressions
- parentheses are created minimally
added SwiftOperators from swift-syntax as a new dependency to SourceKitLSP
registered in `SyntaxCodeActions.allSyntaxCodeActions`
registered in Sources/SourceKitLSP/CMakeLists.txt
added tests in `CodeActionTests`1 parent d11c101 commit 39d9077
File tree
5 files changed
+850
-0
lines changed- Sources/SourceKitLSP
- Swift/CodeActions
- Tests/SourceKitLSPTests
5 files changed
+850
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments