Skip to content

Commit db38e0f

Browse files
authored
Merge pull request #1235 from kimdv/kimdv/update-swift-syntax
Update swift syntax
2 parents 486a86c + c49ed07 commit db38e0f

File tree

6 files changed

+18
-2
lines changed

6 files changed

+18
-2
lines changed

CodeGeneration/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let package = Package(
1111
.executable(name: "generate-swiftsyntax", targets: ["generate-swiftsyntax"]),
1212
],
1313
dependencies: [
14-
.package(url: "https://github.com/apple/swift-syntax.git", revision: "dc89ef5759b58298f04c5edee48aed5e678e80f0"),
14+
.package(url: "https://github.com/apple/swift-syntax.git", revision: "486a86c2c41785026cdc4813af1d4a508d644759"),
1515
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.1.4")),
1616
],
1717
targets: [

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxRewriterFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ let syntaxRewriterFile = SourceFileSyntax(leadingTrivia: .docLineComment(generat
101101
}
102102
""")
103103

104-
for baseKind in SYNTAX_BASE_KINDS.filter { !["Syntax", "SyntaxCollection"].contains($0) } {
104+
for baseKind in SYNTAX_BASE_KINDS.filter({ !["Syntax", "SyntaxCollection"].contains($0) }) {
105105
FunctionDeclSyntax("""
106106
/// Visit any \(raw: baseKind)Syntax node.
107107
/// - Parameter node: the node that is being visited

Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17+
// MARK: - DeclSyntax
18+
19+
/// Protocol to which all `DeclSyntax` nodes conform. Extension point to add
20+
/// common methods to all `DeclSyntax` nodes.
21+
/// DO NOT CONFORM TO THIS PROTOCOL YOURSELF!
1722
public protocol DeclSyntaxProtocol: SyntaxProtocol {
1823
}
1924

Sources/SwiftSyntax/generated/SyntaxEnum.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17+
/// Enum to exhaustively switch over all different syntax nodes.
1718
@frozen // FIXME: Not actually stable, works around a miscompile
1819
public enum SyntaxEnum {
1920
case token(TokenSyntax)

Sources/SwiftSyntax/generated/SyntaxKind.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17+
/// Enumerates the known kinds of Syntax represented in the Syntax tree.
1718
@frozen // FIXME: Not actually stable, works around a miscompile
1819
public enum SyntaxKind {
1920
case token

Sources/SwiftSyntax/generated/SyntaxRewriter.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17+
//
18+
// This file defines the SyntaxRewriter, a class that performs a standard walk
19+
// and tree-rebuilding pattern.
20+
//
21+
// Subclassers of this class can override the walking behavior for any syntax
22+
// node and transform nodes however they like.
23+
//
24+
//===----------------------------------------------------------------------===//
25+
1726
open class SyntaxRewriter {
1827
public init() {
1928
}

0 commit comments

Comments
 (0)