Skip to content

Commit c92825c

Browse files
authored
Merge pull request #1629 from ahoppen/ahoppen/compatibility
Add a compatibility layer for SwiftSyntax
2 parents 2179d9f + 963a8c0 commit c92825c

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Sources/SwiftSyntax/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ add_swift_host_library(SwiftSyntax
1818
SourceLength.swift
1919
SourceLocation.swift
2020
SourcePresence.swift
21+
SwiftSyntaxCompatibility.swift
2122
Syntax.swift
2223
SyntaxArena.swift
2324
SyntaxChildren.swift
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
// This file provides compatiblity aliases to keep dependents of SwiftSyntax building.
14+
// All users of the declarations in this file should transition away from them ASAP.
15+
16+
public extension DeclGroupSyntax {
17+
@available(*, deprecated, renamed: "memberBlock")
18+
var members: MemberDeclBlockSyntax {
19+
return self.memberBlock
20+
}
21+
}

utils/group.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@
6262
"SyntaxVerifier.swift",
6363
"BumpPtrAllocator.swift",
6464
"PlatformMutex.swift",
65+
"SwiftSyntaxCompatibility.swift",
6566
]
6667
}

0 commit comments

Comments
 (0)