diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62fe07de47c..1b24b704aeb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 80916098d60..76501d7d627 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -2,4 +2,4 @@
The code of conduct for this project can be found at https://swift.org/code-of-conduct.
-
+
diff --git a/CodeGeneration/Package.swift b/CodeGeneration/Package.swift
index 83558e6e262..239190cb148 100644
--- a/CodeGeneration/Package.swift
+++ b/CodeGeneration/Package.swift
@@ -11,8 +11,8 @@ let package = Package(
.executable(name: "generate-swiftsyntax", targets: ["generate-swiftsyntax"])
],
dependencies: [
- .package(url: "https://github.com/apple/swift-syntax.git", revision: "d73b60bb61a394c85d7a3c739b034e65a11032e6"),
- .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.1.4")),
+ .package(url: "https://github.com/apple/swift-syntax.git", revision: "cf413a6fe9a82e3f8e1c022cac6f6d23dfb1a035"),
+ .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.2.2")),
],
targets: [
.executableTarget(
diff --git a/CodeGeneration/Sources/SyntaxSupport/AttributeKinds.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/AttributeKinds.swift.gyb
index 2b16f764830..f8bfd6b104e 100644
--- a/CodeGeneration/Sources/SyntaxSupport/AttributeKinds.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/AttributeKinds.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift.gyb
index 5dcbc8a3082..627fb246319 100644
--- a/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
public let ATTRIBUTE_NODES: [Node] = [
-% for node in ATTRIBUTE_NODES:
+% for node in sorted(ATTRIBUTE_NODES, key=lambda x: x.name):
${make_swift_node(node)},
% end
diff --git a/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift.gyb
index ee54fc581bb..774f02a2706 100644
--- a/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
public let AVAILABILITY_NODES: [Node] = [
-% for node in AVAILABILITY_NODES:
+% for node in sorted(AVAILABILITY_NODES, key=lambda x: x.name):
${make_swift_node(node)},
% end
diff --git a/CodeGeneration/Sources/SyntaxSupport/BuilderInitializableTypes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/BuilderInitializableTypes.swift.gyb
index 6d2e5d20fe6..8991ca402bb 100644
--- a/CodeGeneration/Sources/SyntaxSupport/BuilderInitializableTypes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/BuilderInitializableTypes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/Child.swift b/CodeGeneration/Sources/SyntaxSupport/Child.swift
index f2f9096e071..2f77d52a427 100644
--- a/CodeGeneration/Sources/SyntaxSupport/Child.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/Child.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/Classification.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/Classification.swift.gyb
index 2c420bd44ab..7fde63ce55e 100644
--- a/CodeGeneration/Sources/SyntaxSupport/Classification.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/Classification.swift.gyb
@@ -11,7 +11,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -52,7 +52,7 @@ public class ChildClassification {
public let SYNTAX_CLASSIFICATIONS: [SyntaxClassification] = [
-% for syntaxClassification in SYNTAX_CLASSIFICATIONS:
+% for syntaxClassification in sorted(SYNTAX_CLASSIFICATIONS, key=lambda x: x.name):
SyntaxClassification(name: "${syntaxClassification.name}", description: "${syntaxClassification.description.strip()}"),
% end
]
diff --git a/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift.gyb
index 8d365ea7139..a9484b33a22 100644
--- a/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
public let COMMON_NODES: [Node] = [
-% for node in COMMON_NODES:
+% for node in sorted(COMMON_NODES, key=lambda x: x.name):
${make_swift_node(node)},
% end
diff --git a/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift.gyb
index 23aaf2cab04..a870ba9cb26 100644
--- a/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
public let DECL_NODES: [Node] = [
-% for node in DECL_NODES:
+% for node in sorted(DECL_NODES, key=lambda x: x.name):
${make_swift_node(node)},
% end
diff --git a/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift.gyb
index cd19ff9d9d6..09ac4c8a91f 100644
--- a/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
public let EXPR_NODES: [Node] = [
-% for node in EXPR_NODES:
+% for node in sorted(EXPR_NODES, key=lambda x: x.name):
${make_swift_node(node)},
% end
diff --git a/CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift.gyb
index 4abf59a2d37..ef26a4ef6d3 100644
--- a/CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
public let GENERIC_NODES: [Node] = [
-% for node in GENERIC_NODES:
+% for node in sorted(GENERIC_NODES, key=lambda x: x.name):
${make_swift_node(node)},
% end
diff --git a/CodeGeneration/Sources/SyntaxSupport/KeywordSpec.swift b/CodeGeneration/Sources/SyntaxSupport/KeywordSpec.swift
index 61377539ab3..372106cc573 100644
--- a/CodeGeneration/Sources/SyntaxSupport/KeywordSpec.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/KeywordSpec.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/Node.swift b/CodeGeneration/Sources/SyntaxSupport/Node.swift
index 52c53c77194..80da352dc77 100644
--- a/CodeGeneration/Sources/SyntaxSupport/Node.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/Node.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/PatternNodes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/PatternNodes.swift.gyb
index d583b723b5f..652b650c757 100644
--- a/CodeGeneration/Sources/SyntaxSupport/PatternNodes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/PatternNodes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
public let PATTERN_NODES: [Node] = [
-% for node in PATTERN_NODES:
+% for node in sorted(PATTERN_NODES, key=lambda x: x.name):
${make_swift_node(node)},
% end
diff --git a/CodeGeneration/Sources/SyntaxSupport/StmtNodes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/StmtNodes.swift.gyb
index b2a9fc53fb7..ed949592700 100644
--- a/CodeGeneration/Sources/SyntaxSupport/StmtNodes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/StmtNodes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
public let STMT_NODES: [Node] = [
-% for node in STMT_NODES:
+% for node in sorted(STMT_NODES, key=lambda x: x.name):
${make_swift_node(node)},
% end
diff --git a/CodeGeneration/Sources/SyntaxSupport/SyntaxBaseKinds.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/SyntaxBaseKinds.swift.gyb
index c596797c323..48b4961b6ef 100644
--- a/CodeGeneration/Sources/SyntaxSupport/SyntaxBaseKinds.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/SyntaxBaseKinds.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/SyntaxNodes.swift b/CodeGeneration/Sources/SyntaxSupport/SyntaxNodes.swift
index 25110df72da..6e73255e9bb 100644
--- a/CodeGeneration/Sources/SyntaxSupport/SyntaxNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/SyntaxNodes.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/TokenSpec.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/TokenSpec.swift.gyb
index b8788a09a29..56c203218ae 100644
--- a/CodeGeneration/Sources/SyntaxSupport/TokenSpec.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/TokenSpec.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -175,7 +175,7 @@ public class LiteralSpec: TokenSpec { }
public class MiscSpec: TokenSpec { }
public let SYNTAX_TOKENS: [TokenSpec] = [
-% for token in SYNTAX_TOKENS:
+% for token in sorted(SYNTAX_TOKENS, key=lambda x: x.name):
% class_name = type(token).__name__
% classification = "classification: \"%s\"" % token.classification.name if token.classification.name not in ['None', 'Keyword', 'ObjectLiteral', 'PoundDirectiveKeyword'] or class_name == 'Misc' and token.classification.name != 'None' else None
% parameters = ["name: \"%s\"" % token.name]
diff --git a/CodeGeneration/Sources/SyntaxSupport/Traits.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/Traits.swift.gyb
index 20a4904c3cd..e2d1b0fd14a 100644
--- a/CodeGeneration/Sources/SyntaxSupport/Traits.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/Traits.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -31,7 +31,7 @@ public class Trait {
}
public let TRAITS: [Trait] = [
-% for trait in TRAITS:
+% for trait in sorted(TRAITS, key=lambda x: x.trait_name):
Trait(traitName: "${trait.trait_name}",
children: [
% for child in trait.children:
diff --git a/CodeGeneration/Sources/SyntaxSupport/Trivia.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/Trivia.swift.gyb
index e61700360cc..1754ca8aaa2 100644
--- a/CodeGeneration/Sources/SyntaxSupport/Trivia.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/Trivia.swift.gyb
@@ -9,7 +9,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -66,7 +66,7 @@ public class Trivia {
}
public let TRIVIAS: [Trivia] = [
-% for trivia in TRIVIAS:
+% for trivia in sorted(TRIVIAS, key=lambda x: x.name):
% parameters = [
% 'name: "%s"' % trivia.name,
% 'comment: #"%s"#' % trivia.comment,
diff --git a/CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift.gyb b/CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift.gyb
index 4821ee0837d..b76c0968735 100644
--- a/CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift.gyb
+++ b/CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
public let TYPE_NODES: [Node] = [
-% for node in TYPE_NODES:
+% for node in sorted(TYPE_NODES, key=lambda x: x.name):
${make_swift_node(node)},
% end
diff --git a/CodeGeneration/Sources/SyntaxSupport/Utils.swift b/CodeGeneration/Sources/SyntaxSupport/Utils.swift
index 7322cccc0fa..59f13e4fa27 100644
--- a/CodeGeneration/Sources/SyntaxSupport/Utils.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/Utils.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeKinds.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeKinds.swift
index 36f43faefb8..1f5eaf4d457 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeKinds.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeKinds.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeNodes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeNodes.swift
index ef946155366..b5627e4ecca 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeNodes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,6 +13,14 @@
//===----------------------------------------------------------------------===//
public let ATTRIBUTE_NODES: [Node] = [
+ Node(name: "AttributeList",
+ nameForDiagnostics: "attributes",
+ kind: "SyntaxCollection",
+ element: "Syntax",
+ elementName: "Attribute",
+ elementChoices: ["Attribute", "IfConfigDecl"],
+ omitWhenEmpty: true),
+
Node(name: "Attribute",
nameForDiagnostics: "attribute",
description: "An `@` attribute.",
@@ -82,22 +90,6 @@ public let ATTRIBUTE_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "AttributeList",
- nameForDiagnostics: "attributes",
- kind: "SyntaxCollection",
- element: "Syntax",
- elementName: "Attribute",
- elementChoices: ["Attribute", "IfConfigDecl"],
- omitWhenEmpty: true),
-
- Node(name: "SpecializeAttributeSpecList",
- nameForDiagnostics: "argument to '@_specialize",
- description: "A collection of arguments for the `@_specialize` attribute",
- kind: "SyntaxCollection",
- element: "Syntax",
- elementName: "SpecializeAttribute",
- elementChoices: ["LabeledSpecializeEntry", "AvailabilityEntry", "TargetFunctionEntry", "GenericWhereClause"]),
-
Node(name: "AvailabilityEntry",
nameForDiagnostics: "availability entry",
description: "The availability argument for the _specialize attribute",
@@ -116,56 +108,76 @@ public let ATTRIBUTE_NODES: [Node] = [
kind: .token(choices: [.token(tokenKind: "SemicolonToken")]))
]),
- Node(name: "LabeledSpecializeEntry",
- nameForDiagnostics: "attribute argument",
- description: "A labeled argument for the `@_specialize` attribute like `exported: true`",
+ Node(name: "AvailabilityVersionRestrictionListEntry",
+ nameForDiagnostics: "version",
+ description: "A single platform/version pair in an attribute, e.g. `iOS 10.1`.",
kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
children: [
- Child(name: "Label",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .keyword(text: "available"), .keyword(text: "exported"), .keyword(text: "kind"), .keyword(text: "spi"), .keyword(text: "spiModule")]),
- nameForDiagnostics: "label",
- description: "The label of the argument"),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")]),
- description: "The colon separating the label and the value"),
- Child(name: "Value",
- kind: .node(kind: "Token"),
- nameForDiagnostics: "value",
- description: "The value for this argument"),
+ Child(name: "AvailabilityVersionRestriction",
+ kind: .node(kind: "AvailabilityVersionRestriction"),
+ classification: "Keyword"),
Child(name: "TrailingComma",
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- description: "A trailing comma if this argument is followed by another one",
+ description: "A trailing comma if the argument is followed by another argument",
isOptional: true)
]),
- Node(name: "TargetFunctionEntry",
- nameForDiagnostics: "attribute argument",
- description: "A labeled argument for the `@_specialize` attribute with a function decl value like `target: myFunc(_:)`",
+ Node(name: "AvailabilityVersionRestrictionList",
+ nameForDiagnostics: "version list",
+ kind: "SyntaxCollection",
+ element: "AvailabilityVersionRestrictionListEntry"),
+
+ Node(name: "BackDeployedAttributeSpecList",
+ nameForDiagnostics: "'@backDeployed' arguments",
+ description: "A collection of arguments for the `@backDeployed` attribute",
kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
children: [
- Child(name: "Label",
- kind: .token(choices: [.keyword(text: "target")]),
- nameForDiagnostics: "label",
- description: "The label of the argument"),
+ Child(name: "BeforeLabel",
+ kind: .token(choices: [.keyword(text: "before")]),
+ description: "The \"before\" label."),
Child(name: "Colon",
kind: .token(choices: [.token(tokenKind: "ColonToken")]),
- description: "The colon separating the label and the value"),
- Child(name: "Declname",
- kind: .node(kind: "DeclName"),
- nameForDiagnostics: "declaration name",
- description: "The value for this argument"),
- Child(name: "TrailingComma",
+ description: "The colon separating \"before\" and the parameter list."),
+ Child(name: "VersionList",
+ kind: .collection(kind: "AvailabilityVersionRestrictionList", collectionElementName: "Availability"),
+ description: "The list of OS versions in which the declaration became ABI stable.")
+ ]),
+
+ Node(name: "ConventionAttributeArguments",
+ nameForDiagnostics: "@convention(...) arguments",
+ description: "The arguments for the '@convention(...)'.",
+ kind: "Syntax",
+ children: [
+ Child(name: "ConventionLabel",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ description: "The convention label."),
+ Child(name: "Comma",
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- description: "A trailing comma if this argument is followed by another one",
+ isOptional: true),
+ Child(name: "CTypeLabel",
+ kind: .token(choices: [.keyword(text: "cType")]),
+ isOptional: true),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")]),
+ isOptional: true),
+ Child(name: "CTypeString",
+ kind: .node(kind: "StringLiteralExpr"),
isOptional: true)
]),
+ Node(name: "ConventionWitnessMethodAttributeArguments",
+ nameForDiagnostics: "@convention(...) arguments for witness methods",
+ description: "The arguments for the '@convention(witness_method: ...)'.",
+ kind: "Syntax",
+ children: [
+ Child(name: "WitnessMethodLabel",
+ kind: .token(choices: [.keyword(text: "witness_method")])),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "ProtocolName",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]))
+ ]),
+
Node(name: "DeclName",
nameForDiagnostics: "declaration name",
kind: "Syntax",
@@ -181,69 +193,53 @@ public let ATTRIBUTE_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "ImplementsAttributeArguments",
- nameForDiagnostics: "@_implements arguemnts",
- description: "The arguments for the `@_implements` attribute of the form `Type, methodName(arg1Label:arg2Label:)`",
+ Node(name: "DerivativeRegistrationAttributeArguments",
+ nameForDiagnostics: "attribute arguments",
+ description: "The arguments for the '@derivative(of:)' and '@transpose(of:)' attributes: the 'of:' label, the original declaration name, and an optional differentiability parameter list.",
kind: "Syntax",
children: [
- Child(name: "Type",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "type",
- description: "The type for which the method with this attribute implements a requirement."),
+ Child(name: "OfLabel",
+ kind: .token(choices: [.keyword(text: "of")]),
+ description: "The \"of\" label."),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")]),
+ description: "The colon separating the \"of\" label and the original declaration name."),
+ Child(name: "OriginalDeclName",
+ kind: .node(kind: "QualifiedDeclName"),
+ description: "The referenced original declaration name."),
+ Child(name: "Period",
+ kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
+ description: "The period separating the original declaration name and the accessor name.",
+ isOptional: true),
+ Child(name: "AccessorKind",
+ kind: .token(choices: [.keyword(text: "get"), .keyword(text: "set")]),
+ description: "The accessor name.",
+ isOptional: true),
Child(name: "Comma",
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- description: "The comma separating the type and method name"),
- Child(name: "DeclBaseName",
- kind: .node(kind: "Token"),
- nameForDiagnostics: "declaration base name",
- description: "The base name of the protocol's requirement."),
- Child(name: "DeclNameArguments",
- kind: .node(kind: "DeclNameArguments"),
- nameForDiagnostics: "declaration name arguments",
- description: "The argument labels of the protocol's requirement if it is a function requirement.",
- isOptional: true)
- ]),
-
- Node(name: "ObjCSelectorPiece",
- nameForDiagnostics: "Objective-C selector piece",
- description: "A piece of an Objective-C selector. Either consisting of just an identifier for a nullary selector, an identifier and a colon for a labeled argument or just a colon for an unlabeled argument",
- kind: "Syntax",
- children: [
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- nameForDiagnostics: "name",
isOptional: true),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")]),
+ Child(name: "DiffParams",
+ kind: .node(kind: "DifferentiabilityParamsClause"),
isOptional: true)
]),
- Node(name: "ObjCSelector",
- nameForDiagnostics: "Objective-C selector",
+ Node(name: "DifferentiabilityParamList",
+ nameForDiagnostics: "differentiability parameters",
kind: "SyntaxCollection",
- element: "ObjCSelectorPiece"),
+ element: "DifferentiabilityParam"),
- Node(name: "DifferentiableAttributeArguments",
- nameForDiagnostics: "'@differentiable' arguments",
- description: "The arguments for the `@differentiable` attribute: an optional differentiability kind, an optional differentiability parameter clause, and an optional 'where' clause.",
+ Node(name: "DifferentiabilityParam",
+ nameForDiagnostics: "differentiability parameter",
+ description: "A differentiability parameter: either the \"self\" identifier, a function parameter name, or a function parameter index.",
kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
children: [
- Child(name: "DiffKind",
- kind: .token(choices: [.keyword(text: "forward"), .keyword(text: "reverse"), .keyword(text: "linear")]),
- isOptional: true),
- Child(name: "DiffKindComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- description: "The comma following the differentiability kind, if it exists.",
- isOptional: true),
- Child(name: "DiffParams",
- kind: .node(kind: "DifferentiabilityParamsClause"),
- isOptional: true),
- Child(name: "DiffParamsComma",
+ Child(name: "Parameter",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "IntegerLiteralToken"), .token(tokenKind: "KeywordToken")])),
+ Child(name: "TrailingComma",
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- description: "The comma following the differentiability parameters clause, if it exists.",
- isOptional: true),
- Child(name: "WhereClause",
- kind: .node(kind: "GenericWhereClause"),
isOptional: true)
]),
@@ -282,115 +278,162 @@ public let ATTRIBUTE_NODES: [Node] = [
kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
]),
- Node(name: "DifferentiabilityParamList",
- nameForDiagnostics: "differentiability parameters",
- kind: "SyntaxCollection",
- element: "DifferentiabilityParam"),
+ Node(name: "DifferentiableAttributeArguments",
+ nameForDiagnostics: "'@differentiable' arguments",
+ description: "The arguments for the `@differentiable` attribute: an optional differentiability kind, an optional differentiability parameter clause, and an optional 'where' clause.",
+ kind: "Syntax",
+ children: [
+ Child(name: "DiffKind",
+ kind: .token(choices: [.keyword(text: "forward"), .keyword(text: "reverse"), .keyword(text: "linear")]),
+ isOptional: true),
+ Child(name: "DiffKindComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ description: "The comma following the differentiability kind, if it exists.",
+ isOptional: true),
+ Child(name: "DiffParams",
+ kind: .node(kind: "DifferentiabilityParamsClause"),
+ isOptional: true),
+ Child(name: "DiffParamsComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ description: "The comma following the differentiability parameters clause, if it exists.",
+ isOptional: true),
+ Child(name: "WhereClause",
+ kind: .node(kind: "GenericWhereClause"),
+ isOptional: true)
+ ]),
- Node(name: "DifferentiabilityParam",
- nameForDiagnostics: "differentiability parameter",
- description: "A differentiability parameter: either the \"self\" identifier, a function parameter name, or a function parameter index.",
+ Node(name: "DocumentationAttributeArgument",
+ nameForDiagnostics: "@_documentation argument",
kind: "Syntax",
traits: [
"WithTrailingComma"
],
children: [
- Child(name: "Parameter",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "IntegerLiteralToken"), .token(tokenKind: "KeywordToken")])),
+ Child(name: "Label",
+ kind: .token(choices: [.keyword(text: "visibility"), .keyword(text: "metadata")]),
+ nameForDiagnostics: "label"),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "Value",
+ kind: .nodeChoices(choices: [
+ Child(name: "Token",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken")])),
+ Child(name: "String",
+ kind: .node(kind: "StringLiteralExpr"))
+ ])),
Child(name: "TrailingComma",
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ description: "A trailing comma if this argument is followed by another one",
isOptional: true)
]),
- Node(name: "DerivativeRegistrationAttributeArguments",
- nameForDiagnostics: "attribute arguments",
- description: "The arguments for the '@derivative(of:)' and '@transpose(of:)' attributes: the 'of:' label, the original declaration name, and an optional differentiability parameter list.",
- kind: "Syntax",
- children: [
- Child(name: "OfLabel",
- kind: .token(choices: [.keyword(text: "of")]),
- description: "The \"of\" label."),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")]),
- description: "The colon separating the \"of\" label and the original declaration name."),
- Child(name: "OriginalDeclName",
- kind: .node(kind: "QualifiedDeclName"),
- description: "The referenced original declaration name."),
- Child(name: "Period",
- kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
- description: "The period separating the original declaration name and the accessor name.",
- isOptional: true),
- Child(name: "AccessorKind",
- kind: .token(choices: [.keyword(text: "get"), .keyword(text: "set")]),
- description: "The accessor name.",
- isOptional: true),
+ Node(name: "DocumentationAttributeArguments",
+ nameForDiagnostics: "@_documentation arguments",
+ description: "The arguments of the '@_documentation' attribute",
+ kind: "SyntaxCollection",
+ element: "DocumentationAttributeArgument"),
+
+ Node(name: "DynamicReplacementArguments",
+ nameForDiagnostics: "@_dynamicReplacement argument",
+ description: "The arguments for the '@_dynamicReplacement' attribute",
+ kind: "Syntax",
+ children: [
+ Child(name: "ForLabel",
+ kind: .token(choices: [.keyword(text: "for")], requiresTrailingSpace: false)),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "Declname",
+ kind: .node(kind: "DeclName"))
+ ]),
+
+ Node(name: "EffectsArguments",
+ nameForDiagnostics: "@_effects arguments",
+ description: "The arguments of the '@_effect' attribute. These will be parsed during the SIL stage.",
+ kind: "SyntaxCollection",
+ element: "Token"),
+
+ Node(name: "ExposeAttributeArguments",
+ nameForDiagnostics: "@_expose arguments",
+ description: "The arguments for the '@_expose' attribute",
+ kind: "Syntax",
+ children: [
+ Child(name: "Language",
+ kind: .node(kind: "Token")),
Child(name: "Comma",
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
isOptional: true),
- Child(name: "DiffParams",
- kind: .node(kind: "DifferentiabilityParamsClause"),
+ Child(name: "CxxName",
+ kind: .node(kind: "StringLiteralExpr"),
isOptional: true)
]),
- Node(name: "QualifiedDeclName",
- nameForDiagnostics: "declaration name",
- description: "An optionally qualified function declaration name (e.g. `+(_:_:)`, `A.B.C.foo(_:_:)`).",
+ Node(name: "ImplementsAttributeArguments",
+ nameForDiagnostics: "@_implements arguemnts",
+ description: "The arguments for the `@_implements` attribute of the form `Type, methodName(arg1Label:arg2Label:)`",
kind: "Syntax",
children: [
- Child(name: "BaseType",
+ Child(name: "Type",
kind: .node(kind: "Type"),
- nameForDiagnostics: "base type",
- description: "The base type of the qualified name, optionally specified.",
- isOptional: true),
- Child(name: "Dot",
- kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
- isOptional: true),
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "PrefixOperatorToken"), .token(tokenKind: "PostfixOperatorToken")]),
- nameForDiagnostics: "base name",
- description: "The base name of the referenced function."),
- Child(name: "Arguments",
+ nameForDiagnostics: "type",
+ description: "The type for which the method with this attribute implements a requirement."),
+ Child(name: "Comma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ description: "The comma separating the type and method name"),
+ Child(name: "DeclBaseName",
+ kind: .node(kind: "Token"),
+ nameForDiagnostics: "declaration base name",
+ description: "The base name of the protocol's requirement."),
+ Child(name: "DeclNameArguments",
kind: .node(kind: "DeclNameArguments"),
- nameForDiagnostics: "arguments",
- description: "The argument labels of the referenced function, optionally specified.",
+ nameForDiagnostics: "declaration name arguments",
+ description: "The argument labels of the protocol's requirement if it is a function requirement.",
isOptional: true)
]),
- Node(name: "BackDeployedAttributeSpecList",
- nameForDiagnostics: "'@backDeployed' arguments",
- description: "A collection of arguments for the `@backDeployed` attribute",
+ Node(name: "LabeledSpecializeEntry",
+ nameForDiagnostics: "attribute argument",
+ description: "A labeled argument for the `@_specialize` attribute like `exported: true`",
kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
children: [
- Child(name: "BeforeLabel",
- kind: .token(choices: [.keyword(text: "before")]),
- description: "The \"before\" label."),
+ Child(name: "Label",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .keyword(text: "available"), .keyword(text: "exported"), .keyword(text: "kind"), .keyword(text: "spi"), .keyword(text: "spiModule")]),
+ nameForDiagnostics: "label",
+ description: "The label of the argument"),
Child(name: "Colon",
kind: .token(choices: [.token(tokenKind: "ColonToken")]),
- description: "The colon separating \"before\" and the parameter list."),
- Child(name: "VersionList",
- kind: .collection(kind: "AvailabilityVersionRestrictionList", collectionElementName: "Availability"),
- description: "The list of OS versions in which the declaration became ABI stable.")
+ description: "The colon separating the label and the value"),
+ Child(name: "Value",
+ kind: .node(kind: "Token"),
+ nameForDiagnostics: "value",
+ description: "The value for this argument"),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ description: "A trailing comma if this argument is followed by another one",
+ isOptional: true)
]),
- Node(name: "AvailabilityVersionRestrictionList",
- nameForDiagnostics: "version list",
- kind: "SyntaxCollection",
- element: "AvailabilityVersionRestrictionListEntry"),
-
- Node(name: "AvailabilityVersionRestrictionListEntry",
- nameForDiagnostics: "version",
- description: "A single platform/version pair in an attribute, e.g. `iOS 10.1`.",
+ Node(name: "ObjCSelectorPiece",
+ nameForDiagnostics: "Objective-C selector piece",
+ description: "A piece of an Objective-C selector. Either consisting of just an identifier for a nullary selector, an identifier and a colon for a labeled argument or just a colon for an unlabeled argument",
kind: "Syntax",
children: [
- Child(name: "AvailabilityVersionRestriction",
- kind: .node(kind: "AvailabilityVersionRestriction"),
- classification: "Keyword"),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- description: "A trailing comma if the argument is followed by another argument",
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ nameForDiagnostics: "name",
+ isOptional: true),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")]),
isOptional: true)
]),
+ Node(name: "ObjCSelector",
+ nameForDiagnostics: "Objective-C selector",
+ kind: "SyntaxCollection",
+ element: "ObjCSelectorPiece"),
+
Node(name: "OpaqueReturnTypeOfAttributeArguments",
nameForDiagnostics: "opaque return type arguments",
description: "The arguments for the '@_opaqueReturnTypeOf()'.",
@@ -406,56 +449,6 @@ public let ATTRIBUTE_NODES: [Node] = [
description: "The ordinal corresponding to the 'some' keyword that introduced this opaque type.")
]),
- Node(name: "ConventionAttributeArguments",
- nameForDiagnostics: "@convention(...) arguments",
- description: "The arguments for the '@convention(...)'.",
- kind: "Syntax",
- children: [
- Child(name: "ConventionLabel",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- description: "The convention label."),
- Child(name: "Comma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true),
- Child(name: "CTypeLabel",
- kind: .token(choices: [.keyword(text: "cType")]),
- isOptional: true),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")]),
- isOptional: true),
- Child(name: "CTypeString",
- kind: .node(kind: "StringLiteralExpr"),
- isOptional: true)
- ]),
-
- Node(name: "ConventionWitnessMethodAttributeArguments",
- nameForDiagnostics: "@convention(...) arguments for witness methods",
- description: "The arguments for the '@convention(witness_method: ...)'.",
- kind: "Syntax",
- children: [
- Child(name: "WitnessMethodLabel",
- kind: .token(choices: [.keyword(text: "witness_method")])),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "ProtocolName",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]))
- ]),
-
- Node(name: "ExposeAttributeArguments",
- nameForDiagnostics: "@_expose arguments",
- description: "The arguments for the '@_expose' attribute",
- kind: "Syntax",
- children: [
- Child(name: "Language",
- kind: .node(kind: "Token")),
- Child(name: "Comma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true),
- Child(name: "CxxName",
- kind: .node(kind: "StringLiteralExpr"),
- isOptional: true)
- ]),
-
Node(name: "OriginallyDefinedInArguments",
nameForDiagnostics: "@_originallyDefinedIn arguments",
description: "The arguments for the '@_originallyDefinedIn' attribute",
@@ -473,30 +466,61 @@ public let ATTRIBUTE_NODES: [Node] = [
kind: .collection(kind: "AvailabilityVersionRestrictionList", collectionElementName: "Platform"))
]),
- Node(name: "UnderscorePrivateAttributeArguments",
- nameForDiagnostics: "@_private argument",
- description: "The arguments for the '@_private' attribute",
+ Node(name: "QualifiedDeclName",
+ nameForDiagnostics: "declaration name",
+ description: "An optionally qualified function declaration name (e.g. `+(_:_:)`, `A.B.C.foo(_:_:)`).",
kind: "Syntax",
children: [
- Child(name: "SourceFileLabel",
- kind: .token(choices: [.keyword(text: "sourceFile")])),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "Filename",
- kind: .node(kind: "StringLiteralExpr"))
+ Child(name: "BaseType",
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "base type",
+ description: "The base type of the qualified name, optionally specified.",
+ isOptional: true),
+ Child(name: "Dot",
+ kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
+ isOptional: true),
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "PrefixOperatorToken"), .token(tokenKind: "PostfixOperatorToken")]),
+ nameForDiagnostics: "base name",
+ description: "The base name of the referenced function."),
+ Child(name: "Arguments",
+ kind: .node(kind: "DeclNameArguments"),
+ nameForDiagnostics: "arguments",
+ description: "The argument labels of the referenced function, optionally specified.",
+ isOptional: true)
]),
- Node(name: "DynamicReplacementArguments",
- nameForDiagnostics: "@_dynamicReplacement argument",
- description: "The arguments for the '@_dynamicReplacement' attribute",
+ Node(name: "SpecializeAttributeSpecList",
+ nameForDiagnostics: "argument to '@_specialize",
+ description: "A collection of arguments for the `@_specialize` attribute",
+ kind: "SyntaxCollection",
+ element: "Syntax",
+ elementName: "SpecializeAttribute",
+ elementChoices: ["LabeledSpecializeEntry", "AvailabilityEntry", "TargetFunctionEntry", "GenericWhereClause"]),
+
+ Node(name: "TargetFunctionEntry",
+ nameForDiagnostics: "attribute argument",
+ description: "A labeled argument for the `@_specialize` attribute with a function decl value like `target: myFunc(_:)`",
kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
children: [
- Child(name: "ForLabel",
- kind: .token(choices: [.keyword(text: "for")], requiresTrailingSpace: false)),
+ Child(name: "Label",
+ kind: .token(choices: [.keyword(text: "target")]),
+ nameForDiagnostics: "label",
+ description: "The label of the argument"),
Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ kind: .token(choices: [.token(tokenKind: "ColonToken")]),
+ description: "The colon separating the label and the value"),
Child(name: "Declname",
- kind: .node(kind: "DeclName"))
+ kind: .node(kind: "DeclName"),
+ nameForDiagnostics: "declaration name",
+ description: "The value for this argument"),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ description: "A trailing comma if this argument is followed by another one",
+ isOptional: true)
]),
Node(name: "UnavailableFromAsyncArguments",
@@ -512,41 +536,17 @@ public let ATTRIBUTE_NODES: [Node] = [
kind: .node(kind: "StringLiteralExpr"))
]),
- Node(name: "EffectsArguments",
- nameForDiagnostics: "@_effects arguments",
- description: "The arguments of the '@_effect' attribute. These will be parsed during the SIL stage.",
- kind: "SyntaxCollection",
- element: "Token"),
-
- Node(name: "DocumentationAttributeArgument",
- nameForDiagnostics: "@_documentation argument",
+ Node(name: "UnderscorePrivateAttributeArguments",
+ nameForDiagnostics: "@_private argument",
+ description: "The arguments for the '@_private' attribute",
kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
children: [
- Child(name: "Label",
- kind: .token(choices: [.keyword(text: "visibility"), .keyword(text: "metadata")]),
- nameForDiagnostics: "label"),
+ Child(name: "SourceFileLabel",
+ kind: .token(choices: [.keyword(text: "sourceFile")])),
Child(name: "Colon",
kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "Value",
- kind: .nodeChoices(choices: [
- Child(name: "Token",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken")])),
- Child(name: "String",
- kind: .node(kind: "StringLiteralExpr"))
- ])),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- description: "A trailing comma if this argument is followed by another one",
- isOptional: true)
+ Child(name: "Filename",
+ kind: .node(kind: "StringLiteralExpr"))
]),
- Node(name: "DocumentationAttributeArguments",
- nameForDiagnostics: "@_documentation arguments",
- description: "The arguments of the '@_documentation' attribute",
- kind: "SyntaxCollection",
- element: "DocumentationAttributeArgument"),
-
]
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AvailabilityNodes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AvailabilityNodes.swift
index ad3db69a436..f7780ab00fd 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AvailabilityNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/AvailabilityNodes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,11 +13,6 @@
//===----------------------------------------------------------------------===//
public let AVAILABILITY_NODES: [Node] = [
- Node(name: "AvailabilitySpecList",
- nameForDiagnostics: "'@availability' arguments",
- kind: "SyntaxCollection",
- element: "AvailabilityArgument"),
-
Node(name: "AvailabilityArgument",
nameForDiagnostics: "availability argument",
description: "A single argument to an `@available` argument like `*`, `iOS 10.1`, or `message: \"This has been deprecated\"`.",
@@ -62,6 +57,11 @@ public let AVAILABILITY_NODES: [Node] = [
description: "The value of this labeled argument")
]),
+ Node(name: "AvailabilitySpecList",
+ nameForDiagnostics: "'@availability' arguments",
+ kind: "SyntaxCollection",
+ element: "AvailabilityArgument"),
+
Node(name: "AvailabilityVersionRestriction",
nameForDiagnostics: "version restriction",
description: "An argument to `@available` that restricts the availability on a certain platform to a version, e.g. `iOS 10` or `swift 3.4`.",
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/BuilderInitializableTypes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/BuilderInitializableTypes.swift
index 362384628a3..61223de7d46 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/BuilderInitializableTypes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/BuilderInitializableTypes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Classification.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Classification.swift
index 6a9a55f70ea..24268631e4b 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Classification.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Classification.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -45,25 +45,25 @@ public class ChildClassification {
public let SYNTAX_CLASSIFICATIONS: [SyntaxClassification] = [
- SyntaxClassification(name: "None", description: "The token should not receive syntax coloring."),
- SyntaxClassification(name: "Keyword", description: "A Swift keyword, including contextual keywords."),
- SyntaxClassification(name: "Identifier", description: "A generic identifier."),
- SyntaxClassification(name: "TypeIdentifier", description: "An identifier referring to a type."),
- SyntaxClassification(name: "OperatorIdentifier", description: "An identifier referring to an operator."),
- SyntaxClassification(name: "DollarIdentifier", description: "An identifier starting with `$` like `$0`."),
- SyntaxClassification(name: "IntegerLiteral", description: "An integer literal."),
- SyntaxClassification(name: "FloatingLiteral", description: "A floating point literal."),
- SyntaxClassification(name: "StringLiteral", description: "A string literal including multiline string literals."),
- SyntaxClassification(name: "StringInterpolationAnchor", description: "The opening and closing parenthesis of string interpolation."),
- SyntaxClassification(name: "PoundDirectiveKeyword", description: "A `#` keyword like `#warning`."),
- SyntaxClassification(name: "BuildConfigId", description: "A build configuration directive like `#if`, `#elseif`, `#else`."),
SyntaxClassification(name: "Attribute", description: "An attribute starting with an `@`."),
- SyntaxClassification(name: "ObjectLiteral", description: "An image, color, etc. literal."),
- SyntaxClassification(name: "EditorPlaceholder", description: "An editor placeholder of the form `<#content#>`"),
- SyntaxClassification(name: "LineComment", description: "A line comment starting with `//`."),
- SyntaxClassification(name: "DocLineComment", description: "A doc line comment starting with `///`."),
SyntaxClassification(name: "BlockComment", description: "A block comment starting with `/**` and ending with `*/."),
+ SyntaxClassification(name: "BuildConfigId", description: "A build configuration directive like `#if`, `#elseif`, `#else`."),
SyntaxClassification(name: "DocBlockComment", description: "A doc block comment starting with `/**` and ending with `*/."),
+ SyntaxClassification(name: "DocLineComment", description: "A doc line comment starting with `///`."),
+ SyntaxClassification(name: "DollarIdentifier", description: "An identifier starting with `$` like `$0`."),
+ SyntaxClassification(name: "EditorPlaceholder", description: "An editor placeholder of the form `<#content#>`"),
+ SyntaxClassification(name: "FloatingLiteral", description: "A floating point literal."),
+ SyntaxClassification(name: "Identifier", description: "A generic identifier."),
+ SyntaxClassification(name: "IntegerLiteral", description: "An integer literal."),
+ SyntaxClassification(name: "Keyword", description: "A Swift keyword, including contextual keywords."),
+ SyntaxClassification(name: "LineComment", description: "A line comment starting with `//`."),
+ SyntaxClassification(name: "None", description: "The token should not receive syntax coloring."),
+ SyntaxClassification(name: "ObjectLiteral", description: "An image, color, etc. literal."),
+ SyntaxClassification(name: "OperatorIdentifier", description: "An identifier referring to an operator."),
+ SyntaxClassification(name: "PoundDirectiveKeyword", description: "A `#` keyword like `#warning`."),
+ SyntaxClassification(name: "StringInterpolationAnchor", description: "The opening and closing parenthesis of string interpolation."),
+ SyntaxClassification(name: "StringLiteral", description: "A string literal including multiline string literals."),
+ SyntaxClassification(name: "TypeIdentifier", description: "An identifier referring to a type."),
]
func classificationByName(_ name: String?) -> SyntaxClassification? {
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/CommonNodes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/CommonNodes.swift
index 4cd1b440855..8890f23b827 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/CommonNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/CommonNodes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,65 +13,11 @@
//===----------------------------------------------------------------------===//
public let COMMON_NODES: [Node] = [
- Node(name: "Decl",
- nameForDiagnostics: "declaration",
- kind: "Syntax",
- parserFunction: "parseDeclaration"),
-
- Node(name: "Expr",
- nameForDiagnostics: "expression",
- kind: "Syntax",
- parserFunction: "parseExpression"),
-
- Node(name: "Stmt",
- nameForDiagnostics: "statement",
- kind: "Syntax",
- parserFunction: "parseStatement"),
-
- Node(name: "Type",
- nameForDiagnostics: "type",
- kind: "Syntax",
- parserFunction: "parseType"),
-
- Node(name: "Pattern",
- nameForDiagnostics: "pattern",
- kind: "Syntax",
- parserFunction: "parsePattern"),
-
- Node(name: "Missing",
+ Node(name: "CodeBlockItemList",
nameForDiagnostics: nil,
- kind: "Syntax"),
-
- Node(name: "MissingDecl",
- nameForDiagnostics: "declaration",
- kind: "Decl",
- traits: [
- "Attributed"
- ],
- children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- isOptional: true),
- Child(name: "Modifiers",
- kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
- isOptional: true)
- ]),
-
- Node(name: "MissingExpr",
- nameForDiagnostics: "expression",
- kind: "Expr"),
-
- Node(name: "MissingStmt",
- nameForDiagnostics: "statement",
- kind: "Stmt"),
-
- Node(name: "MissingType",
- nameForDiagnostics: "type",
- kind: "Type"),
-
- Node(name: "MissingPattern",
- nameForDiagnostics: "pattern",
- kind: "Pattern"),
+ kind: "SyntaxCollection",
+ element: "CodeBlockItem",
+ elementsSeparatedByNewline: true),
Node(name: "CodeBlockItem",
nameForDiagnostics: nil,
@@ -95,12 +41,6 @@ public let COMMON_NODES: [Node] = [
],
omitWhenEmpty: true),
- Node(name: "CodeBlockItemList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "CodeBlockItem",
- elementsSeparatedByNewline: true),
-
Node(name: "CodeBlock",
nameForDiagnostics: "code block",
kind: "Syntax",
@@ -135,6 +75,61 @@ public let COMMON_NODES: [Node] = [
isOptional: true)
]),
+ Node(name: "Decl",
+ nameForDiagnostics: "declaration",
+ kind: "Syntax",
+ parserFunction: "parseDeclaration"),
+
+ Node(name: "Expr",
+ nameForDiagnostics: "expression",
+ kind: "Syntax",
+ parserFunction: "parseExpression"),
+
+ Node(name: "MissingDecl",
+ nameForDiagnostics: "declaration",
+ kind: "Decl",
+ traits: [
+ "Attributed"
+ ],
+ children: [
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ isOptional: true),
+ Child(name: "Modifiers",
+ kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
+ isOptional: true)
+ ]),
+
+ Node(name: "MissingExpr",
+ nameForDiagnostics: "expression",
+ kind: "Expr"),
+
+ Node(name: "MissingPattern",
+ nameForDiagnostics: "pattern",
+ kind: "Pattern"),
+
+ Node(name: "MissingStmt",
+ nameForDiagnostics: "statement",
+ kind: "Stmt"),
+
+ Node(name: "Missing",
+ nameForDiagnostics: nil,
+ kind: "Syntax"),
+
+ Node(name: "MissingType",
+ nameForDiagnostics: "type",
+ kind: "Type"),
+
+ Node(name: "Pattern",
+ nameForDiagnostics: "pattern",
+ kind: "Syntax",
+ parserFunction: "parsePattern"),
+
+ Node(name: "Stmt",
+ nameForDiagnostics: "statement",
+ kind: "Syntax",
+ parserFunction: "parseStatement"),
+
Node(name: "TypeEffectSpecifiers",
nameForDiagnostics: "effect specifiers",
kind: "Syntax",
@@ -150,6 +145,11 @@ public let COMMON_NODES: [Node] = [
isOptional: true)
]),
+ Node(name: "Type",
+ nameForDiagnostics: "type",
+ kind: "Syntax",
+ parserFunction: "parseType"),
+
Node(name: "UnexpectedNodes",
nameForDiagnostics: nil,
description: "A collection of syntax nodes that occurred in the source code but could not be used to form a valid syntax tree.",
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/DeclNodes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/DeclNodes.swift
index 65d0e58d81b..b26a11e7f00 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/DeclNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/DeclNodes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,21 +13,97 @@
//===----------------------------------------------------------------------===//
public let DECL_NODES: [Node] = [
- Node(name: "TypeInitializerClause",
+ Node(name: "AccessPathComponent",
nameForDiagnostics: nil,
kind: "Syntax",
children: [
- Child(name: "Equal",
- kind: .token(choices: [.token(tokenKind: "EqualToken")])),
- Child(name: "Value",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "type")
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ nameForDiagnostics: "name"),
+ Child(name: "TrailingDot",
+ kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
+ isOptional: true)
]),
- Node(name: "TypealiasDecl",
- nameForDiagnostics: "typealias declaration",
+ Node(name: "AccessPath",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "AccessPathComponent"),
+
+ Node(name: "AccessorBlock",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
+ traits: [
+ "Braced"
+ ],
+ children: [
+ Child(name: "LeftBrace",
+ kind: .token(choices: [.token(tokenKind: "LeftBraceToken")])),
+ Child(name: "Accessors",
+ kind: .collection(kind: "AccessorList", collectionElementName: "Accessor"),
+ isIndented: true),
+ Child(name: "RightBrace",
+ kind: .token(choices: [.token(tokenKind: "RightBraceToken")]),
+ requiresLeadingNewline: true)
+ ]),
+
+ Node(name: "AccessorDecl",
+ nameForDiagnostics: "accessor",
+ kind: "Decl",
+ traits: [
+ "Attributed"
+ ],
+ parserFunction: "parseAccessorDecl",
+ children: [
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ nameForDiagnostics: "attributes",
+ isOptional: true),
+ Child(name: "Modifier",
+ kind: .node(kind: "DeclModifier"),
+ nameForDiagnostics: "modifiers",
+ isOptional: true),
+ Child(name: "AccessorKind",
+ kind: .token(choices: [.keyword(text: "get"), .keyword(text: "set"), .keyword(text: "didSet"), .keyword(text: "willSet"), .keyword(text: "unsafeAddress"), .keyword(text: "addressWithOwner"), .keyword(text: "addressWithNativeOwner"), .keyword(text: "unsafeMutableAddress"), .keyword(text: "mutableAddressWithOwner"), .keyword(text: "mutableAddressWithNativeOwner"), .keyword(text: "_read"), .keyword(text: "_modify")])),
+ Child(name: "Parameter",
+ kind: .node(kind: "AccessorParameter"),
+ nameForDiagnostics: "parameter",
+ isOptional: true),
+ Child(name: "EffectSpecifiers",
+ kind: .node(kind: "DeclEffectSpecifiers"),
+ isOptional: true),
+ Child(name: "Body",
+ kind: .node(kind: "CodeBlock"),
+ isOptional: true)
+ ]),
+
+ Node(name: "AccessorList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "AccessorDecl",
+ elementsSeparatedByNewline: true),
+
+ Node(name: "AccessorParameter",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
+ traits: [
+ "Parenthesized"
+ ],
+ children: [
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ nameForDiagnostics: "name"),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
+ ]),
+
+ Node(name: "ActorDecl",
+ nameForDiagnostics: "actor",
kind: "Decl",
traits: [
+ "DeclGroup",
"IdentifiedDecl",
"Attributed"
],
@@ -40,20 +116,24 @@ public let DECL_NODES: [Node] = [
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
nameForDiagnostics: "modifiers",
isOptional: true),
- Child(name: "TypealiasKeyword",
- kind: .token(choices: [.keyword(text: "typealias")])),
+ Child(name: "ActorKeyword",
+ kind: .token(choices: [.keyword(text: "actor")])),
Child(name: "Identifier",
kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
Child(name: "GenericParameterClause",
kind: .node(kind: "GenericParameterClause"),
nameForDiagnostics: "generic parameter clause",
isOptional: true),
- Child(name: "Initializer",
- kind: .node(kind: "TypeInitializerClause")),
+ Child(name: "InheritanceClause",
+ kind: .node(kind: "TypeInheritanceClause"),
+ nameForDiagnostics: "type inheritance clause",
+ isOptional: true),
Child(name: "GenericWhereClause",
kind: .node(kind: "GenericWhereClause"),
nameForDiagnostics: "generic where clause",
- isOptional: true)
+ isOptional: true),
+ Child(name: "Members",
+ kind: .node(kind: "MemberDeclBlock"))
]),
Node(name: "AssociatedtypeDecl",
@@ -89,13 +169,45 @@ public let DECL_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "FunctionParameterList",
- nameForDiagnostics: "parameter list",
- kind: "SyntaxCollection",
- element: "FunctionParameter"),
+ Node(name: "ClassDecl",
+ nameForDiagnostics: "class",
+ kind: "Decl",
+ traits: [
+ "DeclGroup",
+ "IdentifiedDecl",
+ "Attributed"
+ ],
+ children: [
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ nameForDiagnostics: "attributes",
+ isOptional: true),
+ Child(name: "Modifiers",
+ kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
+ nameForDiagnostics: "modifiers",
+ isOptional: true),
+ Child(name: "ClassKeyword",
+ kind: .token(choices: [.keyword(text: "class")])),
+ Child(name: "Identifier",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
+ Child(name: "GenericParameterClause",
+ kind: .node(kind: "GenericParameterClause"),
+ nameForDiagnostics: "generic parameter clause",
+ isOptional: true),
+ Child(name: "InheritanceClause",
+ kind: .node(kind: "TypeInheritanceClause"),
+ nameForDiagnostics: "inheritance clause",
+ isOptional: true),
+ Child(name: "GenericWhereClause",
+ kind: .node(kind: "GenericWhereClause"),
+ nameForDiagnostics: "generic where clause",
+ isOptional: true),
+ Child(name: "Members",
+ kind: .node(kind: "MemberDeclBlock"))
+ ]),
- Node(name: "ParameterClause",
- nameForDiagnostics: "parameter clause",
+ Node(name: "DeclModifierDetail",
+ nameForDiagnostics: nil,
kind: "Syntax",
traits: [
"Parenthesized"
@@ -103,182 +215,131 @@ public let DECL_NODES: [Node] = [
children: [
Child(name: "LeftParen",
kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "ParameterList",
- kind: .collection(kind: "FunctionParameterList", collectionElementName: "Parameter"),
- nameForDiagnostics: "parameters",
- isIndented: true),
+ Child(name: "Detail",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .keyword(text: "set")])),
Child(name: "RightParen",
kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
]),
- Node(name: "ReturnClause",
- nameForDiagnostics: nil,
+ Node(name: "DeclModifier",
+ nameForDiagnostics: "modifier",
kind: "Syntax",
children: [
- Child(name: "Arrow",
- kind: .token(choices: [.token(tokenKind: "ArrowToken")])),
- Child(name: "ReturnType",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "return type")
+ Child(name: "Name",
+ kind: .token(choices: [.keyword(text: "class"), .keyword(text: "convenience"), .keyword(text: "dynamic"), .keyword(text: "final"), .keyword(text: "infix"), .keyword(text: "lazy"), .keyword(text: "optional"), .keyword(text: "override"), .keyword(text: "postfix"), .keyword(text: "prefix"), .keyword(text: "required"), .keyword(text: "static"), .keyword(text: "unowned"), .keyword(text: "weak"), .keyword(text: "private"), .keyword(text: "fileprivate"), .keyword(text: "internal"), .keyword(text: "public"), .keyword(text: "open"), .keyword(text: "mutating"), .keyword(text: "nonmutating"), .keyword(text: "indirect"), .keyword(text: "__consuming"), .keyword(text: "actor"), .keyword(text: "async"), .keyword(text: "distributed"), .keyword(text: "isolated"), .keyword(text: "nonisolated"), .keyword(text: "_const"), .keyword(text: "_local"), .keyword(text: "package")]),
+ classification: "Attribute"),
+ Child(name: "Detail",
+ kind: .node(kind: "DeclModifierDetail"),
+ isOptional: true)
]),
- Node(name: "FunctionSignature",
- nameForDiagnostics: "function signature",
- kind: "Syntax",
+ Node(name: "DeinitializerDecl",
+ nameForDiagnostics: "deinitializer",
+ kind: "Decl",
+ traits: [
+ "Attributed"
+ ],
children: [
- Child(name: "Input",
- kind: .node(kind: "ParameterClause")),
- Child(name: "EffectSpecifiers",
- kind: .node(kind: "DeclEffectSpecifiers"),
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ nameForDiagnostics: "attributes",
isOptional: true),
- Child(name: "Output",
- kind: .node(kind: "ReturnClause"),
+ Child(name: "Modifiers",
+ kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
+ nameForDiagnostics: "modifiers",
+ isOptional: true),
+ Child(name: "DeinitKeyword",
+ kind: .token(choices: [.keyword(text: "deinit")])),
+ Child(name: "Body",
+ kind: .node(kind: "CodeBlock"),
isOptional: true)
]),
- Node(name: "IfConfigClause",
- nameForDiagnostics: "conditional compilation clause",
+ Node(name: "DesignatedTypeElement",
+ nameForDiagnostics: nil,
kind: "Syntax",
children: [
- Child(name: "PoundKeyword",
- kind: .token(choices: [.token(tokenKind: "PoundIfToken"), .token(tokenKind: "PoundElseifToken"), .token(tokenKind: "PoundElseToken")]),
- classification: "BuildConfigId"),
- Child(name: "Condition",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "condition",
- isOptional: true,
- classification: "BuildConfigId"),
- Child(name: "Elements",
- kind: .nodeChoices(choices: [
- Child(name: "Statements",
- kind: .node(kind: "CodeBlockItemList")),
- Child(name: "SwitchCases",
- kind: .node(kind: "SwitchCaseList")),
- Child(name: "Decls",
- kind: .node(kind: "MemberDeclList")),
- Child(name: "PostfixExpression",
- kind: .node(kind: "Expr")),
- Child(name: "Attributes",
- kind: .node(kind: "AttributeList"))
- ]),
- isOptional: true)
+ Child(name: "LeadingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")])),
+ Child(name: "Name",
+ kind: .node(kind: "Token"))
]),
- Node(name: "IfConfigClauseList",
+ Node(name: "DesignatedTypeList",
nameForDiagnostics: nil,
kind: "SyntaxCollection",
- element: "IfConfigClause"),
+ element: "DesignatedTypeElement"),
- Node(name: "IfConfigDecl",
- nameForDiagnostics: "conditional compilation block",
+ Node(name: "EditorPlaceholderDecl",
+ nameForDiagnostics: "editor placeholder",
kind: "Decl",
children: [
- Child(name: "Clauses",
- kind: .collection(kind: "IfConfigClauseList", collectionElementName: "Clause")),
- Child(name: "PoundEndif",
- kind: .token(choices: [.token(tokenKind: "PoundEndifToken")]),
- classification: "BuildConfigId")
+ Child(name: "Identifier",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]))
]),
- Node(name: "PoundSourceLocation",
- nameForDiagnostics: "'#sourceLocation' directive",
+ Node(name: "EnumCaseDecl",
+ nameForDiagnostics: "enum case",
+ description: "A `case` declaration of a Swift `enum`. It can have 1 or more `EnumCaseElement`s inside, each declaring a different case of the enum.",
kind: "Decl",
traits: [
- "Parenthesized"
+ "Attributed"
],
children: [
- Child(name: "PoundSourceLocation",
- kind: .token(choices: [.token(tokenKind: "PoundSourceLocationToken")])),
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "Args",
- kind: .node(kind: "PoundSourceLocationArgs"),
- nameForDiagnostics: "arguments",
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ nameForDiagnostics: "attributes",
+ description: "The attributes applied to the case declaration.",
isOptional: true),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
- ]),
-
- Node(name: "PoundSourceLocationArgs",
- nameForDiagnostics: "'#sourceLocation' arguments",
- kind: "Syntax",
- children: [
- Child(name: "FileArgLabel",
- kind: .token(choices: [.keyword(text: "file")])),
- Child(name: "FileArgColon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "FileName",
- kind: .node(kind: "StringLiteralExpr"),
- nameForDiagnostics: "file name"),
- Child(name: "Comma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")])),
- Child(name: "LineArgLabel",
- kind: .token(choices: [.keyword(text: "line")])),
- Child(name: "LineArgColon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "LineNumber",
- kind: .token(choices: [.token(tokenKind: "IntegerLiteralToken")]),
- nameForDiagnostics: "line number")
+ Child(name: "Modifiers",
+ kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
+ nameForDiagnostics: "modifiers",
+ description: "The declaration modifiers applied to the case declaration.",
+ isOptional: true),
+ Child(name: "CaseKeyword",
+ kind: .token(choices: [.keyword(text: "case")]),
+ description: "The `case` keyword for this case."),
+ Child(name: "Elements",
+ kind: .collection(kind: "EnumCaseElementList", collectionElementName: "Element"),
+ nameForDiagnostics: "elements",
+ description: "The elements this case declares.")
]),
- Node(name: "DeclModifierDetail",
+ Node(name: "EnumCaseElementList",
nameForDiagnostics: nil,
- kind: "Syntax",
- traits: [
- "Parenthesized"
- ],
- children: [
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "Detail",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .keyword(text: "set")])),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
- ]),
-
- Node(name: "DeclModifier",
- nameForDiagnostics: "modifier",
- kind: "Syntax",
- children: [
- Child(name: "Name",
- kind: .token(choices: [.keyword(text: "class"), .keyword(text: "convenience"), .keyword(text: "dynamic"), .keyword(text: "final"), .keyword(text: "infix"), .keyword(text: "lazy"), .keyword(text: "optional"), .keyword(text: "override"), .keyword(text: "postfix"), .keyword(text: "prefix"), .keyword(text: "required"), .keyword(text: "static"), .keyword(text: "unowned"), .keyword(text: "weak"), .keyword(text: "private"), .keyword(text: "fileprivate"), .keyword(text: "internal"), .keyword(text: "public"), .keyword(text: "open"), .keyword(text: "mutating"), .keyword(text: "nonmutating"), .keyword(text: "indirect"), .keyword(text: "__consuming"), .keyword(text: "actor"), .keyword(text: "async"), .keyword(text: "distributed"), .keyword(text: "isolated"), .keyword(text: "nonisolated"), .keyword(text: "_const"), .keyword(text: "_local"), .keyword(text: "package")]),
- classification: "Attribute"),
- Child(name: "Detail",
- kind: .node(kind: "DeclModifierDetail"),
- isOptional: true)
- ]),
+ description: "A collection of 0 or more `EnumCaseElement`s.",
+ kind: "SyntaxCollection",
+ element: "EnumCaseElement"),
- Node(name: "InheritedType",
- nameForDiagnostics: "inherited type",
+ Node(name: "EnumCaseElement",
+ nameForDiagnostics: nil,
+ description: "An element of an enum case, containing the name of the case and, optionally, either associated values or an assignment to a raw value.",
kind: "Syntax",
traits: [
"WithTrailingComma"
],
children: [
- Child(name: "TypeName",
- kind: .node(kind: "Type")),
+ Child(name: "Identifier",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ description: "The name of this case."),
+ Child(name: "AssociatedValue",
+ kind: .node(kind: "ParameterClause"),
+ nameForDiagnostics: "associated values",
+ description: "The set of associated values of the case.",
+ isOptional: true),
+ Child(name: "RawValue",
+ kind: .node(kind: "InitializerClause"),
+ description: "The raw value of this enum element, if present.",
+ isOptional: true),
Child(name: "TrailingComma",
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ description: "The trailing comma of this element, if the case has multiple elements.",
isOptional: true)
]),
- Node(name: "InheritedTypeList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "InheritedType"),
-
- Node(name: "TypeInheritanceClause",
- nameForDiagnostics: "inheritance clause",
- kind: "Syntax",
- children: [
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "InheritedTypeCollection",
- kind: .collection(kind: "InheritedTypeList", collectionElementName: "InheritedType"))
- ]),
-
- Node(name: "ClassDecl",
- nameForDiagnostics: "class",
+ Node(name: "EnumDecl",
+ nameForDiagnostics: "enum",
+ description: "A Swift `enum` declaration.",
kind: "Decl",
traits: [
"DeclGroup",
@@ -289,37 +350,44 @@ public let DECL_NODES: [Node] = [
Child(name: "Attributes",
kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
nameForDiagnostics: "attributes",
+ description: "The attributes applied to the enum declaration.",
isOptional: true),
Child(name: "Modifiers",
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
nameForDiagnostics: "modifiers",
+ description: "The declaration modifiers applied to the enum declaration.",
isOptional: true),
- Child(name: "ClassKeyword",
- kind: .token(choices: [.keyword(text: "class")])),
+ Child(name: "EnumKeyword",
+ kind: .token(choices: [.keyword(text: "enum")]),
+ description: "The `enum` keyword for this declaration."),
Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
- Child(name: "GenericParameterClause",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ description: "The name of this enum."),
+ Child(name: "GenericParameters",
kind: .node(kind: "GenericParameterClause"),
nameForDiagnostics: "generic parameter clause",
+ description: "The generic parameters, if any, for this enum.",
isOptional: true),
Child(name: "InheritanceClause",
kind: .node(kind: "TypeInheritanceClause"),
nameForDiagnostics: "inheritance clause",
+ description: "The inheritance clause describing conformances or raw values for this enum.",
isOptional: true),
Child(name: "GenericWhereClause",
kind: .node(kind: "GenericWhereClause"),
nameForDiagnostics: "generic where clause",
+ description: "The `where` clause that applies to the generic parameters of this enum.",
isOptional: true),
Child(name: "Members",
- kind: .node(kind: "MemberDeclBlock"))
+ kind: .node(kind: "MemberDeclBlock"),
+ description: "The cases and other members of this enum.")
]),
- Node(name: "ActorDecl",
- nameForDiagnostics: "actor",
+ Node(name: "ExtensionDecl",
+ nameForDiagnostics: "extension",
kind: "Decl",
traits: [
"DeclGroup",
- "IdentifiedDecl",
"Attributed"
],
children: [
@@ -331,17 +399,13 @@ public let DECL_NODES: [Node] = [
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
nameForDiagnostics: "modifiers",
isOptional: true),
- Child(name: "ActorKeyword",
- kind: .token(choices: [.keyword(text: "actor")])),
- Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
- Child(name: "GenericParameterClause",
- kind: .node(kind: "GenericParameterClause"),
- nameForDiagnostics: "generic parameter clause",
- isOptional: true),
+ Child(name: "ExtensionKeyword",
+ kind: .token(choices: [.keyword(text: "extension")])),
+ Child(name: "ExtendedType",
+ kind: .node(kind: "Type")),
Child(name: "InheritanceClause",
kind: .node(kind: "TypeInheritanceClause"),
- nameForDiagnostics: "type inheritance clause",
+ nameForDiagnostics: "inheritance clause",
isOptional: true),
Child(name: "GenericWhereClause",
kind: .node(kind: "GenericWhereClause"),
@@ -351,11 +415,10 @@ public let DECL_NODES: [Node] = [
kind: .node(kind: "MemberDeclBlock"))
]),
- Node(name: "StructDecl",
- nameForDiagnostics: "struct",
+ Node(name: "FunctionDecl",
+ nameForDiagnostics: "function",
kind: "Decl",
traits: [
- "DeclGroup",
"IdentifiedDecl",
"Attributed"
],
@@ -368,32 +431,36 @@ public let DECL_NODES: [Node] = [
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
nameForDiagnostics: "modifiers",
isOptional: true),
- Child(name: "StructKeyword",
- kind: .token(choices: [.keyword(text: "struct")])),
+ Child(name: "FuncKeyword",
+ kind: .token(choices: [.keyword(text: "func")])),
Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "PrefixOperatorToken"), .token(tokenKind: "PostfixOperatorToken")])),
Child(name: "GenericParameterClause",
kind: .node(kind: "GenericParameterClause"),
nameForDiagnostics: "generic parameter clause",
isOptional: true),
- Child(name: "InheritanceClause",
- kind: .node(kind: "TypeInheritanceClause"),
- nameForDiagnostics: "type inheritance clause",
- isOptional: true),
+ Child(name: "Signature",
+ kind: .node(kind: "FunctionSignature"),
+ nameForDiagnostics: "function signature"),
Child(name: "GenericWhereClause",
kind: .node(kind: "GenericWhereClause"),
nameForDiagnostics: "generic where clause",
isOptional: true),
- Child(name: "Members",
- kind: .node(kind: "MemberDeclBlock"))
+ Child(name: "Body",
+ kind: .node(kind: "CodeBlock"),
+ isOptional: true)
]),
- Node(name: "ProtocolDecl",
- nameForDiagnostics: "protocol",
- kind: "Decl",
+ Node(name: "FunctionParameterList",
+ nameForDiagnostics: "parameter list",
+ kind: "SyntaxCollection",
+ element: "FunctionParameter"),
+
+ Node(name: "FunctionParameter",
+ nameForDiagnostics: "parameter",
+ kind: "Syntax",
traits: [
- "DeclGroup",
- "IdentifiedDecl",
+ "WithTrailingComma",
"Attributed"
],
children: [
@@ -405,126 +472,94 @@ public let DECL_NODES: [Node] = [
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
nameForDiagnostics: "modifiers",
isOptional: true),
- Child(name: "ProtocolKeyword",
- kind: .token(choices: [.keyword(text: "protocol")])),
- Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
- Child(name: "PrimaryAssociatedTypeClause",
- kind: .node(kind: "PrimaryAssociatedTypeClause"),
- nameForDiagnostics: "primary associated type clause",
- isOptional: true),
- Child(name: "InheritanceClause",
- kind: .node(kind: "TypeInheritanceClause"),
- nameForDiagnostics: "inheritance clause",
+ Child(name: "FirstName",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "WildcardToken")]),
isOptional: true),
- Child(name: "GenericWhereClause",
- kind: .node(kind: "GenericWhereClause"),
- nameForDiagnostics: "generic where clause",
+ Child(name: "SecondName",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "WildcardToken")]),
+ nameForDiagnostics: "internal name",
isOptional: true),
- Child(name: "Members",
- kind: .node(kind: "MemberDeclBlock"))
- ]),
-
- Node(name: "ExtensionDecl",
- nameForDiagnostics: "extension",
- kind: "Decl",
- traits: [
- "DeclGroup",
- "Attributed"
- ],
- children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- nameForDiagnostics: "attributes",
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")]),
isOptional: true),
- Child(name: "Modifiers",
- kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
- nameForDiagnostics: "modifiers",
+ Child(name: "Type",
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "type",
isOptional: true),
- Child(name: "ExtensionKeyword",
- kind: .token(choices: [.keyword(text: "extension")])),
- Child(name: "ExtendedType",
- kind: .node(kind: "Type")),
- Child(name: "InheritanceClause",
- kind: .node(kind: "TypeInheritanceClause"),
- nameForDiagnostics: "inheritance clause",
+ Child(name: "Ellipsis",
+ kind: .token(choices: [.token(tokenKind: "EllipsisToken")]),
isOptional: true),
- Child(name: "GenericWhereClause",
- kind: .node(kind: "GenericWhereClause"),
- nameForDiagnostics: "generic where clause",
+ Child(name: "DefaultArgument",
+ kind: .node(kind: "InitializerClause"),
+ nameForDiagnostics: "default argument",
isOptional: true),
- Child(name: "Members",
- kind: .node(kind: "MemberDeclBlock"))
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
]),
- Node(name: "MemberDeclBlock",
- nameForDiagnostics: "member block",
+ Node(name: "FunctionSignature",
+ nameForDiagnostics: "function signature",
kind: "Syntax",
- traits: [
- "Braced"
- ],
- parserFunction: "parseMemberDeclList",
children: [
- Child(name: "LeftBrace",
- kind: .token(choices: [.token(tokenKind: "LeftBraceToken")])),
- Child(name: "Members",
- kind: .collection(kind: "MemberDeclList", collectionElementName: "Member"),
- isIndented: true),
- Child(name: "RightBrace",
- kind: .token(choices: [.token(tokenKind: "RightBraceToken")]),
- requiresLeadingNewline: true)
+ Child(name: "Input",
+ kind: .node(kind: "ParameterClause")),
+ Child(name: "EffectSpecifiers",
+ kind: .node(kind: "DeclEffectSpecifiers"),
+ isOptional: true),
+ Child(name: "Output",
+ kind: .node(kind: "ReturnClause"),
+ isOptional: true)
]),
- Node(name: "MemberDeclList",
+ Node(name: "IfConfigClauseList",
nameForDiagnostics: nil,
kind: "SyntaxCollection",
- element: "MemberDeclListItem",
- elementsSeparatedByNewline: true),
+ element: "IfConfigClause"),
- Node(name: "MemberDeclListItem",
- nameForDiagnostics: nil,
- description: "A member declaration of a type consisting of a declaration and an optional semicolon;",
+ Node(name: "IfConfigClause",
+ nameForDiagnostics: "conditional compilation clause",
kind: "Syntax",
children: [
- Child(name: "Decl",
- kind: .node(kind: "Decl"),
- description: "The declaration of the type member."),
- Child(name: "Semicolon",
- kind: .token(choices: [.token(tokenKind: "SemicolonToken")]),
- description: "An optional trailing semicolon.",
+ Child(name: "PoundKeyword",
+ kind: .token(choices: [.token(tokenKind: "PoundIfToken"), .token(tokenKind: "PoundElseifToken"), .token(tokenKind: "PoundElseToken")]),
+ classification: "BuildConfigId"),
+ Child(name: "Condition",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "condition",
+ isOptional: true,
+ classification: "BuildConfigId"),
+ Child(name: "Elements",
+ kind: .nodeChoices(choices: [
+ Child(name: "Statements",
+ kind: .node(kind: "CodeBlockItemList")),
+ Child(name: "SwitchCases",
+ kind: .node(kind: "SwitchCaseList")),
+ Child(name: "Decls",
+ kind: .node(kind: "MemberDeclList")),
+ Child(name: "PostfixExpression",
+ kind: .node(kind: "Expr")),
+ Child(name: "Attributes",
+ kind: .node(kind: "AttributeList"))
+ ]),
isOptional: true)
- ],
- omitWhenEmpty: true),
-
- Node(name: "SourceFile",
- nameForDiagnostics: "source file",
- kind: "Syntax",
- traits: [
- "WithStatements"
- ],
- parserFunction: "parseSourceFile",
- children: [
- Child(name: "Statements",
- kind: .collection(kind: "CodeBlockItemList", collectionElementName: "Statement")),
- Child(name: "EOFToken",
- kind: .node(kind: "EOFToken"))
]),
- Node(name: "InitializerClause",
- nameForDiagnostics: nil,
- kind: "Syntax",
+ Node(name: "IfConfigDecl",
+ nameForDiagnostics: "conditional compilation block",
+ kind: "Decl",
children: [
- Child(name: "Equal",
- kind: .token(choices: [.token(tokenKind: "EqualToken")])),
- Child(name: "Value",
- kind: .node(kind: "Expr"))
+ Child(name: "Clauses",
+ kind: .collection(kind: "IfConfigClauseList", collectionElementName: "Clause")),
+ Child(name: "PoundEndif",
+ kind: .token(choices: [.token(tokenKind: "PoundEndifToken")]),
+ classification: "BuildConfigId")
]),
- Node(name: "FunctionParameter",
- nameForDiagnostics: "parameter",
- kind: "Syntax",
+ Node(name: "ImportDecl",
+ nameForDiagnostics: "import",
+ kind: "Decl",
traits: [
- "WithTrailingComma",
"Attributed"
],
children: [
@@ -536,75 +571,44 @@ public let DECL_NODES: [Node] = [
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
nameForDiagnostics: "modifiers",
isOptional: true),
- Child(name: "FirstName",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "WildcardToken")]),
- isOptional: true),
- Child(name: "SecondName",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "WildcardToken")]),
- nameForDiagnostics: "internal name",
- isOptional: true),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")]),
- isOptional: true),
- Child(name: "Type",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "type",
- isOptional: true),
- Child(name: "Ellipsis",
- kind: .token(choices: [.token(tokenKind: "EllipsisToken")]),
- isOptional: true),
- Child(name: "DefaultArgument",
- kind: .node(kind: "InitializerClause"),
- nameForDiagnostics: "default argument",
+ Child(name: "ImportTok",
+ kind: .token(choices: [.keyword(text: "import")])),
+ Child(name: "ImportKind",
+ kind: .token(choices: [.keyword(text: "typealias"), .keyword(text: "struct"), .keyword(text: "class"), .keyword(text: "enum"), .keyword(text: "protocol"), .keyword(text: "var"), .keyword(text: "let"), .keyword(text: "func")]),
isOptional: true),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
+ Child(name: "Path",
+ kind: .collection(kind: "AccessPath", collectionElementName: "PathComponent"))
]),
- Node(name: "ModifierList",
+ Node(name: "InheritedTypeList",
nameForDiagnostics: nil,
kind: "SyntaxCollection",
- element: "DeclModifier",
- elementName: "Modifier",
- omitWhenEmpty: true),
+ element: "InheritedType"),
- Node(name: "FunctionDecl",
- nameForDiagnostics: "function",
- kind: "Decl",
+ Node(name: "InheritedType",
+ nameForDiagnostics: "inherited type",
+ kind: "Syntax",
traits: [
- "IdentifiedDecl",
- "Attributed"
+ "WithTrailingComma"
],
children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- nameForDiagnostics: "attributes",
- isOptional: true),
- Child(name: "Modifiers",
- kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
- nameForDiagnostics: "modifiers",
- isOptional: true),
- Child(name: "FuncKeyword",
- kind: .token(choices: [.keyword(text: "func")])),
- Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "PrefixOperatorToken"), .token(tokenKind: "PostfixOperatorToken")])),
- Child(name: "GenericParameterClause",
- kind: .node(kind: "GenericParameterClause"),
- nameForDiagnostics: "generic parameter clause",
- isOptional: true),
- Child(name: "Signature",
- kind: .node(kind: "FunctionSignature"),
- nameForDiagnostics: "function signature"),
- Child(name: "GenericWhereClause",
- kind: .node(kind: "GenericWhereClause"),
- nameForDiagnostics: "generic where clause",
- isOptional: true),
- Child(name: "Body",
- kind: .node(kind: "CodeBlock"),
+ Child(name: "TypeName",
+ kind: .node(kind: "Type")),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
isOptional: true)
]),
+ Node(name: "InitializerClause",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
+ children: [
+ Child(name: "Equal",
+ kind: .token(choices: [.token(tokenKind: "EqualToken")])),
+ Child(name: "Value",
+ kind: .node(kind: "Expr"))
+ ]),
+
Node(name: "InitializerDecl",
nameForDiagnostics: "initializer",
kind: "Decl",
@@ -641,10 +645,11 @@ public let DECL_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "DeinitializerDecl",
- nameForDiagnostics: "deinitializer",
+ Node(name: "MacroDecl",
+ nameForDiagnostics: "macro",
kind: "Decl",
traits: [
+ "IdentifiedDecl",
"Attributed"
],
children: [
@@ -656,95 +661,160 @@ public let DECL_NODES: [Node] = [
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
nameForDiagnostics: "modifiers",
isOptional: true),
- Child(name: "DeinitKeyword",
- kind: .token(choices: [.keyword(text: "deinit")])),
- Child(name: "Body",
- kind: .node(kind: "CodeBlock"),
+ Child(name: "MacroKeyword",
+ kind: .token(choices: [.keyword(text: "macro")])),
+ Child(name: "Identifier",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
+ Child(name: "GenericParameterClause",
+ kind: .node(kind: "GenericParameterClause"),
+ nameForDiagnostics: "generic parameter clause",
+ isOptional: true),
+ Child(name: "Signature",
+ kind: .nodeChoices(choices: [
+ Child(name: "FunctionLike",
+ kind: .node(kind: "FunctionSignature"),
+ nameForDiagnostics: "macro signature"),
+ Child(name: "ValueLike",
+ kind: .node(kind: "TypeAnnotation"),
+ nameForDiagnostics: "macro signature")
+ ]),
+ nameForDiagnostics: "macro signature"),
+ Child(name: "Definition",
+ kind: .node(kind: "InitializerClause"),
+ nameForDiagnostics: "macro definition",
+ isOptional: true),
+ Child(name: "GenericWhereClause",
+ kind: .node(kind: "GenericWhereClause"),
+ nameForDiagnostics: "generic where clause",
isOptional: true)
]),
- Node(name: "SubscriptDecl",
- nameForDiagnostics: "subscript",
+ Node(name: "MacroExpansionDecl",
+ nameForDiagnostics: "macro expansion",
kind: "Decl",
traits: [
- "Attributed"
+ "FreestandingMacroExpansion"
],
children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- nameForDiagnostics: "attributes",
+ Child(name: "PoundToken",
+ kind: .token(choices: [.token(tokenKind: "PoundToken")]),
+ description: "The `#` sign."),
+ Child(name: "Macro",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
+ Child(name: "GenericArguments",
+ kind: .node(kind: "GenericArgumentClause"),
isOptional: true),
- Child(name: "Modifiers",
- kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
- nameForDiagnostics: "modifiers",
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
isOptional: true),
- Child(name: "SubscriptKeyword",
- kind: .token(choices: [.keyword(text: "subscript")])),
- Child(name: "GenericParameterClause",
- kind: .node(kind: "GenericParameterClause"),
- nameForDiagnostics: "generic parameter clause",
+ Child(name: "ArgumentList",
+ kind: .collection(kind: "TupleExprElementList", collectionElementName: "Argument")),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
isOptional: true),
- Child(name: "Indices",
- kind: .node(kind: "ParameterClause")),
- Child(name: "Result",
- kind: .node(kind: "ReturnClause")),
- Child(name: "GenericWhereClause",
- kind: .node(kind: "GenericWhereClause"),
- nameForDiagnostics: "generic where clause",
+ Child(name: "TrailingClosure",
+ kind: .node(kind: "ClosureExpr"),
isOptional: true),
- Child(name: "Accessor",
- kind: .nodeChoices(choices: [
- Child(name: "Accessors",
- kind: .node(kind: "AccessorBlock")),
- Child(name: "Getter",
- kind: .node(kind: "CodeBlock"))
- ]),
+ Child(name: "AdditionalTrailingClosures",
+ kind: .collection(kind: "MultipleTrailingClosureElementList", collectionElementName: "AdditionalTrailingClosure"),
isOptional: true)
]),
- Node(name: "AccessPathComponent",
- nameForDiagnostics: nil,
+ Node(name: "MemberDeclBlock",
+ nameForDiagnostics: "member block",
kind: "Syntax",
+ traits: [
+ "Braced"
+ ],
+ parserFunction: "parseMemberDeclList",
children: [
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- nameForDiagnostics: "name"),
- Child(name: "TrailingDot",
- kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
- isOptional: true)
+ Child(name: "LeftBrace",
+ kind: .token(choices: [.token(tokenKind: "LeftBraceToken")])),
+ Child(name: "Members",
+ kind: .collection(kind: "MemberDeclList", collectionElementName: "Member"),
+ isIndented: true),
+ Child(name: "RightBrace",
+ kind: .token(choices: [.token(tokenKind: "RightBraceToken")]),
+ requiresLeadingNewline: true)
]),
- Node(name: "AccessPath",
+ Node(name: "MemberDeclListItem",
+ nameForDiagnostics: nil,
+ description: "A member declaration of a type consisting of a declaration and an optional semicolon;",
+ kind: "Syntax",
+ children: [
+ Child(name: "Decl",
+ kind: .node(kind: "Decl"),
+ description: "The declaration of the type member."),
+ Child(name: "Semicolon",
+ kind: .token(choices: [.token(tokenKind: "SemicolonToken")]),
+ description: "An optional trailing semicolon.",
+ isOptional: true)
+ ],
+ omitWhenEmpty: true),
+
+ Node(name: "MemberDeclList",
nameForDiagnostics: nil,
kind: "SyntaxCollection",
- element: "AccessPathComponent"),
+ element: "MemberDeclListItem",
+ elementsSeparatedByNewline: true),
- Node(name: "ImportDecl",
- nameForDiagnostics: "import",
+ Node(name: "ModifierList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "DeclModifier",
+ elementName: "Modifier",
+ omitWhenEmpty: true),
+
+ Node(name: "OperatorDecl",
+ nameForDiagnostics: "operator declaration",
+ description: "A Swift `operator` declaration.",
kind: "Decl",
traits: [
+ "IdentifiedDecl",
"Attributed"
],
children: [
Child(name: "Attributes",
kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
nameForDiagnostics: "attributes",
+ description: "The attributes applied to the 'operator' declaration.",
isOptional: true),
Child(name: "Modifiers",
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
nameForDiagnostics: "modifiers",
- isOptional: true),
- Child(name: "ImportTok",
- kind: .token(choices: [.keyword(text: "import")])),
- Child(name: "ImportKind",
- kind: .token(choices: [.keyword(text: "typealias"), .keyword(text: "struct"), .keyword(text: "class"), .keyword(text: "enum"), .keyword(text: "protocol"), .keyword(text: "var"), .keyword(text: "let"), .keyword(text: "func")]),
- isOptional: true),
- Child(name: "Path",
- kind: .collection(kind: "AccessPath", collectionElementName: "PathComponent"))
+ description: "The declaration modifiers applied to the 'operator' declaration.",
+ isOptional: true,
+ classification: "Attribute"),
+ Child(name: "OperatorKeyword",
+ kind: .token(choices: [.keyword(text: "operator")])),
+ Child(name: "Identifier",
+ kind: .token(choices: [.token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "PrefixOperatorToken"), .token(tokenKind: "PostfixOperatorToken")]),
+ classification: "OperatorIdentifier"),
+ Child(name: "OperatorPrecedenceAndTypes",
+ kind: .node(kind: "OperatorPrecedenceAndTypes"),
+ description: "Optionally specify a precedence group and designated types.",
+ isOptional: true)
]),
- Node(name: "AccessorParameter",
+ Node(name: "OperatorPrecedenceAndTypes",
nameForDiagnostics: nil,
+ description: "A clause to specify precedence group in infix operator declarations, and designated types in any operator declaration.",
+ kind: "Syntax",
+ children: [
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "PrecedenceGroup",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ nameForDiagnostics: "precedence group",
+ description: "The precedence group for this operator"),
+ Child(name: "DesignatedTypes",
+ kind: .collection(kind: "DesignatedTypeList", collectionElementName: "DesignatedTypeElement"),
+ description: "The designated types associated with this operator.")
+ ]),
+
+ Node(name: "ParameterClause",
+ nameForDiagnostics: "parameter clause",
kind: "Syntax",
traits: [
"Parenthesized"
@@ -752,65 +822,18 @@ public let DECL_NODES: [Node] = [
children: [
Child(name: "LeftParen",
kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- nameForDiagnostics: "name"),
+ Child(name: "ParameterList",
+ kind: .collection(kind: "FunctionParameterList", collectionElementName: "Parameter"),
+ nameForDiagnostics: "parameters",
+ isIndented: true),
Child(name: "RightParen",
kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
]),
- Node(name: "AccessorDecl",
- nameForDiagnostics: "accessor",
- kind: "Decl",
- traits: [
- "Attributed"
- ],
- parserFunction: "parseAccessorDecl",
- children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- nameForDiagnostics: "attributes",
- isOptional: true),
- Child(name: "Modifier",
- kind: .node(kind: "DeclModifier"),
- nameForDiagnostics: "modifiers",
- isOptional: true),
- Child(name: "AccessorKind",
- kind: .token(choices: [.keyword(text: "get"), .keyword(text: "set"), .keyword(text: "didSet"), .keyword(text: "willSet"), .keyword(text: "unsafeAddress"), .keyword(text: "addressWithOwner"), .keyword(text: "addressWithNativeOwner"), .keyword(text: "unsafeMutableAddress"), .keyword(text: "mutableAddressWithOwner"), .keyword(text: "mutableAddressWithNativeOwner"), .keyword(text: "_read"), .keyword(text: "_modify")])),
- Child(name: "Parameter",
- kind: .node(kind: "AccessorParameter"),
- nameForDiagnostics: "parameter",
- isOptional: true),
- Child(name: "EffectSpecifiers",
- kind: .node(kind: "DeclEffectSpecifiers"),
- isOptional: true),
- Child(name: "Body",
- kind: .node(kind: "CodeBlock"),
- isOptional: true)
- ]),
-
- Node(name: "AccessorList",
+ Node(name: "PatternBindingList",
nameForDiagnostics: nil,
kind: "SyntaxCollection",
- element: "AccessorDecl",
- elementsSeparatedByNewline: true),
-
- Node(name: "AccessorBlock",
- nameForDiagnostics: nil,
- kind: "Syntax",
- traits: [
- "Braced"
- ],
- children: [
- Child(name: "LeftBrace",
- kind: .token(choices: [.token(tokenKind: "LeftBraceToken")])),
- Child(name: "Accessors",
- kind: .collection(kind: "AccessorList", collectionElementName: "Accessor"),
- isIndented: true),
- Child(name: "RightBrace",
- kind: .token(choices: [.token(tokenKind: "RightBraceToken")]),
- requiresLeadingNewline: true)
- ]),
+ element: "PatternBinding"),
Node(name: "PatternBinding",
nameForDiagnostics: nil,
@@ -841,199 +864,83 @@ public let DECL_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "PatternBindingList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "PatternBinding"),
-
- Node(name: "VariableDecl",
- nameForDiagnostics: "variable",
- kind: "Decl",
- traits: [
- "Attributed"
- ],
- children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- nameForDiagnostics: "attributes",
- isOptional: true),
- Child(name: "Modifiers",
- kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
- nameForDiagnostics: "modifiers",
- isOptional: true),
- Child(name: "LetOrVarKeyword",
- kind: .token(choices: [.keyword(text: "let"), .keyword(text: "var")])),
- Child(name: "Bindings",
- kind: .collection(kind: "PatternBindingList", collectionElementName: "Binding"))
- ]),
-
- Node(name: "EnumCaseElement",
- nameForDiagnostics: nil,
- description: "An element of an enum case, containing the name of the case and, optionally, either associated values or an assignment to a raw value.",
+ Node(name: "PoundSourceLocationArgs",
+ nameForDiagnostics: "'#sourceLocation' arguments",
kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
- children: [
- Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- description: "The name of this case."),
- Child(name: "AssociatedValue",
- kind: .node(kind: "ParameterClause"),
- nameForDiagnostics: "associated values",
- description: "The set of associated values of the case.",
- isOptional: true),
- Child(name: "RawValue",
- kind: .node(kind: "InitializerClause"),
- description: "The raw value of this enum element, if present.",
- isOptional: true),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- description: "The trailing comma of this element, if the case has multiple elements.",
- isOptional: true)
- ]),
-
- Node(name: "EnumCaseElementList",
- nameForDiagnostics: nil,
- description: "A collection of 0 or more `EnumCaseElement`s.",
- kind: "SyntaxCollection",
- element: "EnumCaseElement"),
-
- Node(name: "EnumCaseDecl",
- nameForDiagnostics: "enum case",
- description: "A `case` declaration of a Swift `enum`. It can have 1 or more `EnumCaseElement`s inside, each declaring a different case of the enum.",
- kind: "Decl",
- traits: [
- "Attributed"
- ],
- children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- nameForDiagnostics: "attributes",
- description: "The attributes applied to the case declaration.",
- isOptional: true),
- Child(name: "Modifiers",
- kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
- nameForDiagnostics: "modifiers",
- description: "The declaration modifiers applied to the case declaration.",
- isOptional: true),
- Child(name: "CaseKeyword",
- kind: .token(choices: [.keyword(text: "case")]),
- description: "The `case` keyword for this case."),
- Child(name: "Elements",
- kind: .collection(kind: "EnumCaseElementList", collectionElementName: "Element"),
- nameForDiagnostics: "elements",
- description: "The elements this case declares.")
- ]),
-
- Node(name: "EnumDecl",
- nameForDiagnostics: "enum",
- description: "A Swift `enum` declaration.",
- kind: "Decl",
- traits: [
- "DeclGroup",
- "IdentifiedDecl",
- "Attributed"
- ],
children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- nameForDiagnostics: "attributes",
- description: "The attributes applied to the enum declaration.",
- isOptional: true),
- Child(name: "Modifiers",
- kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
- nameForDiagnostics: "modifiers",
- description: "The declaration modifiers applied to the enum declaration.",
- isOptional: true),
- Child(name: "EnumKeyword",
- kind: .token(choices: [.keyword(text: "enum")]),
- description: "The `enum` keyword for this declaration."),
- Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- description: "The name of this enum."),
- Child(name: "GenericParameters",
- kind: .node(kind: "GenericParameterClause"),
- nameForDiagnostics: "generic parameter clause",
- description: "The generic parameters, if any, for this enum.",
- isOptional: true),
- Child(name: "InheritanceClause",
- kind: .node(kind: "TypeInheritanceClause"),
- nameForDiagnostics: "inheritance clause",
- description: "The inheritance clause describing conformances or raw values for this enum.",
- isOptional: true),
- Child(name: "GenericWhereClause",
- kind: .node(kind: "GenericWhereClause"),
- nameForDiagnostics: "generic where clause",
- description: "The `where` clause that applies to the generic parameters of this enum.",
- isOptional: true),
- Child(name: "Members",
- kind: .node(kind: "MemberDeclBlock"),
- description: "The cases and other members of this enum.")
+ Child(name: "FileArgLabel",
+ kind: .token(choices: [.keyword(text: "file")])),
+ Child(name: "FileArgColon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "FileName",
+ kind: .node(kind: "StringLiteralExpr"),
+ nameForDiagnostics: "file name"),
+ Child(name: "Comma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")])),
+ Child(name: "LineArgLabel",
+ kind: .token(choices: [.keyword(text: "line")])),
+ Child(name: "LineArgColon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "LineNumber",
+ kind: .token(choices: [.token(tokenKind: "IntegerLiteralToken")]),
+ nameForDiagnostics: "line number")
]),
- Node(name: "OperatorDecl",
- nameForDiagnostics: "operator declaration",
- description: "A Swift `operator` declaration.",
+ Node(name: "PoundSourceLocation",
+ nameForDiagnostics: "'#sourceLocation' directive",
kind: "Decl",
traits: [
- "IdentifiedDecl",
- "Attributed"
+ "Parenthesized"
],
children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- nameForDiagnostics: "attributes",
- description: "The attributes applied to the 'operator' declaration.",
+ Child(name: "PoundSourceLocation",
+ kind: .token(choices: [.token(tokenKind: "PoundSourceLocationToken")])),
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
+ Child(name: "Args",
+ kind: .node(kind: "PoundSourceLocationArgs"),
+ nameForDiagnostics: "arguments",
isOptional: true),
- Child(name: "Modifiers",
- kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
- nameForDiagnostics: "modifiers",
- description: "The declaration modifiers applied to the 'operator' declaration.",
- isOptional: true,
- classification: "Attribute"),
- Child(name: "OperatorKeyword",
- kind: .token(choices: [.keyword(text: "operator")])),
- Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "PrefixOperatorToken"), .token(tokenKind: "PostfixOperatorToken")]),
- classification: "OperatorIdentifier"),
- Child(name: "OperatorPrecedenceAndTypes",
- kind: .node(kind: "OperatorPrecedenceAndTypes"),
- description: "Optionally specify a precedence group and designated types.",
- isOptional: true)
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
]),
- Node(name: "DesignatedTypeList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "DesignatedTypeElement"),
-
- Node(name: "DesignatedTypeElement",
- nameForDiagnostics: nil,
+ Node(name: "PrecedenceGroupAssignment",
+ nameForDiagnostics: "'assignment' property of precedencegroup",
+ description: "Specifies the precedence of an operator when used in an operation that includes optional chaining.",
kind: "Syntax",
children: [
- Child(name: "LeadingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")])),
- Child(name: "Name",
- kind: .node(kind: "Token"))
+ Child(name: "AssignmentKeyword",
+ kind: .token(choices: [.keyword(text: "assignment")])),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "Flag",
+ kind: .token(choices: [.keyword(text: "true"), .keyword(text: "false")]),
+ description: "When true, an operator in the corresponding precedence group uses the same grouping rules during optional chaining as the assignment operators from the standard library. Otherwise, operators in the precedence group follows the same optional chaining rules as operators that don't perform assignment.")
]),
- Node(name: "OperatorPrecedenceAndTypes",
- nameForDiagnostics: nil,
- description: "A clause to specify precedence group in infix operator declarations, and designated types in any operator declaration.",
+ Node(name: "PrecedenceGroupAssociativity",
+ nameForDiagnostics: "'associativity' property of precedencegroup",
+ description: "Specifies how a sequence of operators with the same precedence level are grouped together in the absence of grouping parentheses.",
kind: "Syntax",
children: [
+ Child(name: "AssociativityKeyword",
+ kind: .token(choices: [.keyword(text: "associativity")]),
+ classification: "Keyword"),
Child(name: "Colon",
kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "PrecedenceGroup",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- nameForDiagnostics: "precedence group",
- description: "The precedence group for this operator"),
- Child(name: "DesignatedTypes",
- kind: .collection(kind: "DesignatedTypeList", collectionElementName: "DesignatedTypeElement"),
- description: "The designated types associated with this operator.")
+ Child(name: "Value",
+ kind: .token(choices: [.keyword(text: "left"), .keyword(text: "right"), .keyword(text: "none")]),
+ description: "Operators that are `left`-associative group left-to-right. Operators that are `right`-associative group right-to-left. Operators that are specified with an associativity of `none` don't associate at all")
]),
+ Node(name: "PrecedenceGroupAttributeList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "Syntax",
+ elementName: "PrecedenceGroupAttribute",
+ elementChoices: ["PrecedenceGroupRelation", "PrecedenceGroupAssignment", "PrecedenceGroupAssociativity"]),
+
Node(name: "PrecedenceGroupDecl",
nameForDiagnostics: "precedencegroup",
description: "A Swift `precedencegroup` declaration.",
@@ -1067,12 +974,22 @@ public let DECL_NODES: [Node] = [
kind: .token(choices: [.token(tokenKind: "RightBraceToken")]))
]),
- Node(name: "PrecedenceGroupAttributeList",
+ Node(name: "PrecedenceGroupNameElement",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
+ children: [
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ nameForDiagnostics: "name"),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
+ ]),
+
+ Node(name: "PrecedenceGroupNameList",
nameForDiagnostics: nil,
kind: "SyntaxCollection",
- element: "Syntax",
- elementName: "PrecedenceGroupAttribute",
- elementChoices: ["PrecedenceGroupRelation", "PrecedenceGroupAssignment", "PrecedenceGroupAssociativity"]),
+ element: "PrecedenceGroupNameElement"),
Node(name: "PrecedenceGroupRelation",
nameForDiagnostics: "'relation' property of precedencegroup",
@@ -1090,56 +1007,73 @@ public let DECL_NODES: [Node] = [
description: "The name of other precedence group to which this precedence group relates.")
]),
- Node(name: "PrecedenceGroupNameList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "PrecedenceGroupNameElement"),
-
- Node(name: "PrecedenceGroupNameElement",
- nameForDiagnostics: nil,
- kind: "Syntax",
+ Node(name: "ProtocolDecl",
+ nameForDiagnostics: "protocol",
+ kind: "Decl",
+ traits: [
+ "DeclGroup",
+ "IdentifiedDecl",
+ "Attributed"
+ ],
children: [
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- nameForDiagnostics: "name"),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ nameForDiagnostics: "attributes",
+ isOptional: true),
+ Child(name: "Modifiers",
+ kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
+ nameForDiagnostics: "modifiers",
+ isOptional: true),
+ Child(name: "ProtocolKeyword",
+ kind: .token(choices: [.keyword(text: "protocol")])),
+ Child(name: "Identifier",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
+ Child(name: "PrimaryAssociatedTypeClause",
+ kind: .node(kind: "PrimaryAssociatedTypeClause"),
+ nameForDiagnostics: "primary associated type clause",
+ isOptional: true),
+ Child(name: "InheritanceClause",
+ kind: .node(kind: "TypeInheritanceClause"),
+ nameForDiagnostics: "inheritance clause",
+ isOptional: true),
+ Child(name: "GenericWhereClause",
+ kind: .node(kind: "GenericWhereClause"),
+ nameForDiagnostics: "generic where clause",
+ isOptional: true),
+ Child(name: "Members",
+ kind: .node(kind: "MemberDeclBlock"))
]),
- Node(name: "PrecedenceGroupAssignment",
- nameForDiagnostics: "'assignment' property of precedencegroup",
- description: "Specifies the precedence of an operator when used in an operation that includes optional chaining.",
+ Node(name: "ReturnClause",
+ nameForDiagnostics: nil,
kind: "Syntax",
children: [
- Child(name: "AssignmentKeyword",
- kind: .token(choices: [.keyword(text: "assignment")])),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "Flag",
- kind: .token(choices: [.keyword(text: "true"), .keyword(text: "false")]),
- description: "When true, an operator in the corresponding precedence group uses the same grouping rules during optional chaining as the assignment operators from the standard library. Otherwise, operators in the precedence group follows the same optional chaining rules as operators that don't perform assignment.")
+ Child(name: "Arrow",
+ kind: .token(choices: [.token(tokenKind: "ArrowToken")])),
+ Child(name: "ReturnType",
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "return type")
]),
- Node(name: "PrecedenceGroupAssociativity",
- nameForDiagnostics: "'associativity' property of precedencegroup",
- description: "Specifies how a sequence of operators with the same precedence level are grouped together in the absence of grouping parentheses.",
+ Node(name: "SourceFile",
+ nameForDiagnostics: "source file",
kind: "Syntax",
+ traits: [
+ "WithStatements"
+ ],
+ parserFunction: "parseSourceFile",
children: [
- Child(name: "AssociativityKeyword",
- kind: .token(choices: [.keyword(text: "associativity")]),
- classification: "Keyword"),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "Value",
- kind: .token(choices: [.keyword(text: "left"), .keyword(text: "right"), .keyword(text: "none")]),
- description: "Operators that are `left`-associative group left-to-right. Operators that are `right`-associative group right-to-left. Operators that are specified with an associativity of `none` don't associate at all")
+ Child(name: "Statements",
+ kind: .collection(kind: "CodeBlockItemList", collectionElementName: "Statement")),
+ Child(name: "EOFToken",
+ kind: .node(kind: "EOFToken"))
]),
- Node(name: "MacroDecl",
- nameForDiagnostics: "macro",
+ Node(name: "StructDecl",
+ nameForDiagnostics: "struct",
kind: "Decl",
traits: [
+ "DeclGroup",
"IdentifiedDecl",
"Attributed"
],
@@ -1152,71 +1086,137 @@ public let DECL_NODES: [Node] = [
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
nameForDiagnostics: "modifiers",
isOptional: true),
- Child(name: "MacroKeyword",
- kind: .token(choices: [.keyword(text: "macro")])),
+ Child(name: "StructKeyword",
+ kind: .token(choices: [.keyword(text: "struct")])),
Child(name: "Identifier",
kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
Child(name: "GenericParameterClause",
kind: .node(kind: "GenericParameterClause"),
nameForDiagnostics: "generic parameter clause",
isOptional: true),
- Child(name: "Signature",
- kind: .nodeChoices(choices: [
- Child(name: "FunctionLike",
- kind: .node(kind: "FunctionSignature"),
- nameForDiagnostics: "macro signature"),
- Child(name: "ValueLike",
- kind: .node(kind: "TypeAnnotation"),
- nameForDiagnostics: "macro signature")
- ]),
- nameForDiagnostics: "macro signature"),
- Child(name: "Definition",
- kind: .node(kind: "InitializerClause"),
- nameForDiagnostics: "macro definition",
+ Child(name: "InheritanceClause",
+ kind: .node(kind: "TypeInheritanceClause"),
+ nameForDiagnostics: "type inheritance clause",
isOptional: true),
Child(name: "GenericWhereClause",
kind: .node(kind: "GenericWhereClause"),
nameForDiagnostics: "generic where clause",
- isOptional: true)
+ isOptional: true),
+ Child(name: "Members",
+ kind: .node(kind: "MemberDeclBlock"))
]),
- Node(name: "MacroExpansionDecl",
- nameForDiagnostics: "macro expansion",
+ Node(name: "SubscriptDecl",
+ nameForDiagnostics: "subscript",
kind: "Decl",
traits: [
- "FreestandingMacroExpansion"
+ "Attributed"
],
children: [
- Child(name: "PoundToken",
- kind: .token(choices: [.token(tokenKind: "PoundToken")]),
- description: "The `#` sign."),
- Child(name: "Macro",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
- Child(name: "GenericArguments",
- kind: .node(kind: "GenericArgumentClause"),
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ nameForDiagnostics: "attributes",
isOptional: true),
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
+ Child(name: "Modifiers",
+ kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
+ nameForDiagnostics: "modifiers",
isOptional: true),
- Child(name: "ArgumentList",
- kind: .collection(kind: "TupleExprElementList", collectionElementName: "Argument")),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
+ Child(name: "SubscriptKeyword",
+ kind: .token(choices: [.keyword(text: "subscript")])),
+ Child(name: "GenericParameterClause",
+ kind: .node(kind: "GenericParameterClause"),
+ nameForDiagnostics: "generic parameter clause",
isOptional: true),
- Child(name: "TrailingClosure",
- kind: .node(kind: "ClosureExpr"),
+ Child(name: "Indices",
+ kind: .node(kind: "ParameterClause")),
+ Child(name: "Result",
+ kind: .node(kind: "ReturnClause")),
+ Child(name: "GenericWhereClause",
+ kind: .node(kind: "GenericWhereClause"),
+ nameForDiagnostics: "generic where clause",
isOptional: true),
- Child(name: "AdditionalTrailingClosures",
- kind: .collection(kind: "MultipleTrailingClosureElementList", collectionElementName: "AdditionalTrailingClosure"),
+ Child(name: "Accessor",
+ kind: .nodeChoices(choices: [
+ Child(name: "Accessors",
+ kind: .node(kind: "AccessorBlock")),
+ Child(name: "Getter",
+ kind: .node(kind: "CodeBlock"))
+ ]),
isOptional: true)
]),
- Node(name: "EditorPlaceholderDecl",
- nameForDiagnostics: "editor placeholder",
+ Node(name: "TypeInheritanceClause",
+ nameForDiagnostics: "inheritance clause",
+ kind: "Syntax",
+ children: [
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "InheritedTypeCollection",
+ kind: .collection(kind: "InheritedTypeList", collectionElementName: "InheritedType"))
+ ]),
+
+ Node(name: "TypeInitializerClause",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
+ children: [
+ Child(name: "Equal",
+ kind: .token(choices: [.token(tokenKind: "EqualToken")])),
+ Child(name: "Value",
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "type")
+ ]),
+
+ Node(name: "TypealiasDecl",
+ nameForDiagnostics: "typealias declaration",
kind: "Decl",
+ traits: [
+ "IdentifiedDecl",
+ "Attributed"
+ ],
children: [
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ nameForDiagnostics: "attributes",
+ isOptional: true),
+ Child(name: "Modifiers",
+ kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
+ nameForDiagnostics: "modifiers",
+ isOptional: true),
+ Child(name: "TypealiasKeyword",
+ kind: .token(choices: [.keyword(text: "typealias")])),
Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]))
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
+ Child(name: "GenericParameterClause",
+ kind: .node(kind: "GenericParameterClause"),
+ nameForDiagnostics: "generic parameter clause",
+ isOptional: true),
+ Child(name: "Initializer",
+ kind: .node(kind: "TypeInitializerClause")),
+ Child(name: "GenericWhereClause",
+ kind: .node(kind: "GenericWhereClause"),
+ nameForDiagnostics: "generic where clause",
+ isOptional: true)
+ ]),
+
+ Node(name: "VariableDecl",
+ nameForDiagnostics: "variable",
+ kind: "Decl",
+ traits: [
+ "Attributed"
+ ],
+ children: [
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ nameForDiagnostics: "attributes",
+ isOptional: true),
+ Child(name: "Modifiers",
+ kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
+ nameForDiagnostics: "modifiers",
+ isOptional: true),
+ Child(name: "LetOrVarKeyword",
+ kind: .token(choices: [.keyword(text: "let"), .keyword(text: "var")])),
+ Child(name: "Bindings",
+ kind: .collection(kind: "PatternBindingList", collectionElementName: "Binding"))
]),
]
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/ExprNodes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/ExprNodes.swift
index 3d66d043a0a..1dc5d97f775 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/ExprNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/ExprNodes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,49 +13,71 @@
//===----------------------------------------------------------------------===//
public let EXPR_NODES: [Node] = [
- Node(name: "InOutExpr",
- nameForDiagnostics: "inout expression",
- kind: "Expr",
- children: [
- Child(name: "Ampersand",
- kind: .token(choices: [.token(tokenKind: "PrefixAmpersandToken")])),
- Child(name: "Expression",
- kind: .node(kind: "Expr"))
- ]),
-
- Node(name: "TupleExprElementList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "TupleExprElement"),
-
Node(name: "ArrayElementList",
nameForDiagnostics: nil,
kind: "SyntaxCollection",
element: "ArrayElement"),
- Node(name: "DictionaryElementList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "DictionaryElement"),
+ Node(name: "ArrayElement",
+ nameForDiagnostics: "array element",
+ kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
+ children: [
+ Child(name: "Expression",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "value"),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
+ ]),
- Node(name: "StringLiteralSegments",
+ Node(name: "ArrayExpr",
+ nameForDiagnostics: "array",
+ kind: "Expr",
+ children: [
+ Child(name: "LeftSquare",
+ kind: .token(choices: [.token(tokenKind: "LeftSquareBracketToken")])),
+ Child(name: "Elements",
+ kind: .collection(kind: "ArrayElementList", collectionElementName: "Element"),
+ isIndented: true),
+ Child(name: "RightSquare",
+ kind: .token(choices: [.token(tokenKind: "RightSquareBracketToken")]))
+ ]),
+
+ Node(name: "ArrowExpr",
nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "Syntax",
- elementName: "Segment",
- elementChoices: ["StringSegment", "ExpressionSegment"]),
+ kind: "Expr",
+ children: [
+ Child(name: "EffectSpecifiers",
+ kind: .node(kind: "TypeEffectSpecifiers"),
+ isOptional: true),
+ Child(name: "ArrowToken",
+ kind: .token(choices: [.token(tokenKind: "ArrowToken")]))
+ ]),
- Node(name: "TryExpr",
- nameForDiagnostics: "'try' expression",
+ Node(name: "AsExpr",
+ nameForDiagnostics: "'as'",
kind: "Expr",
children: [
- Child(name: "TryKeyword",
- kind: .token(choices: [.keyword(text: "try")])),
+ Child(name: "Expression",
+ kind: .node(kind: "Expr")),
+ Child(name: "AsTok",
+ kind: .token(choices: [.keyword(text: "as")])),
Child(name: "QuestionOrExclamationMark",
- kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken"), .token(tokenKind: "ExclamationMarkToken")], requiresTrailingSpace: true),
+ kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken"), .token(tokenKind: "ExclamationMarkToken")]),
isOptional: true),
- Child(name: "Expression",
- kind: .node(kind: "Expr"))
+ Child(name: "TypeName",
+ kind: .node(kind: "Type"))
+ ]),
+
+ Node(name: "AssignmentExpr",
+ nameForDiagnostics: nil,
+ kind: "Expr",
+ children: [
+ Child(name: "AssignToken",
+ kind: .token(choices: [.token(tokenKind: "EqualToken")]))
]),
Node(name: "AwaitExpr",
@@ -68,14 +90,20 @@ public let EXPR_NODES: [Node] = [
kind: .node(kind: "Expr"))
]),
- Node(name: "MoveExpr",
- nameForDiagnostics: "'_move' expression",
+ Node(name: "BinaryOperatorExpr",
+ nameForDiagnostics: "operator",
kind: "Expr",
children: [
- Child(name: "MoveKeyword",
- kind: .token(choices: [.keyword(text: "_move")])),
- Child(name: "Expression",
- kind: .node(kind: "Expr"))
+ Child(name: "OperatorToken",
+ kind: .token(choices: [.token(tokenKind: "BinaryOperatorToken")]))
+ ]),
+
+ Node(name: "BooleanLiteralExpr",
+ nameForDiagnostics: "bool literal",
+ kind: "Expr",
+ children: [
+ Child(name: "BooleanLiteral",
+ kind: .token(choices: [.keyword(text: "true"), .keyword(text: "false")]))
]),
Node(name: "BorrowExpr",
@@ -88,191 +116,208 @@ public let EXPR_NODES: [Node] = [
kind: .node(kind: "Expr"))
]),
- Node(name: "DeclNameArgument",
+ Node(name: "CaseItem",
nameForDiagnostics: nil,
kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
children: [
- Child(name: "Name",
- kind: .node(kind: "Token")),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")], requiresTrailingSpace: false))
+ Child(name: "Pattern",
+ kind: .node(kind: "Pattern")),
+ Child(name: "WhereClause",
+ kind: .node(kind: "WhereClause"),
+ isOptional: true),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
]),
- Node(name: "DeclNameArgumentList",
+ Node(name: "ClosureCaptureItemList",
nameForDiagnostics: nil,
kind: "SyntaxCollection",
- element: "DeclNameArgument"),
+ element: "ClosureCaptureItem"),
- Node(name: "DeclNameArguments",
- nameForDiagnostics: nil,
+ Node(name: "ClosureCaptureItemSpecifier",
+ nameForDiagnostics: "closure capture specifier",
kind: "Syntax",
- traits: [
- "Parenthesized"
- ],
children: [
+ Child(name: "Specifier",
+ kind: .token(choices: [.keyword(text: "weak"), .keyword(text: "unowned")])),
Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "Arguments",
- kind: .collection(kind: "DeclNameArgumentList", collectionElementName: "Argument")),
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
+ isOptional: true),
+ Child(name: "Detail",
+ kind: .token(choices: [.keyword(text: "safe"), .keyword(text: "unsafe")]),
+ isOptional: true),
Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
- ]),
-
- Node(name: "IdentifierExpr",
- nameForDiagnostics: nil,
- kind: "Expr",
- children: [
- Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken"), .token(tokenKind: "DollarIdentifierToken"), .token(tokenKind: "BinaryOperatorToken")])),
- Child(name: "DeclNameArguments",
- kind: .node(kind: "DeclNameArguments"),
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
isOptional: true)
]),
- Node(name: "SuperRefExpr",
- nameForDiagnostics: nil,
- kind: "Expr",
+ Node(name: "ClosureCaptureItem",
+ nameForDiagnostics: "closure capture item",
+ kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
children: [
- Child(name: "SuperKeyword",
- kind: .token(choices: [.keyword(text: "super")]))
+ Child(name: "Specifier",
+ kind: .node(kind: "ClosureCaptureItemSpecifier"),
+ isOptional: true),
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ isOptional: true),
+ Child(name: "AssignToken",
+ kind: .token(choices: [.token(tokenKind: "EqualToken")]),
+ isOptional: true),
+ Child(name: "Expression",
+ kind: .node(kind: "Expr")),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
]),
- Node(name: "NilLiteralExpr",
- nameForDiagnostics: nil,
- kind: "Expr",
+ Node(name: "ClosureCaptureSignature",
+ nameForDiagnostics: "closure capture signature",
+ kind: "Syntax",
children: [
- Child(name: "NilKeyword",
- kind: .token(choices: [.keyword(text: "nil")]))
+ Child(name: "LeftSquare",
+ kind: .token(choices: [.token(tokenKind: "LeftSquareBracketToken")])),
+ Child(name: "Items",
+ kind: .collection(kind: "ClosureCaptureItemList", collectionElementName: "Item"),
+ isOptional: true),
+ Child(name: "RightSquare",
+ kind: .token(choices: [.token(tokenKind: "RightSquareBracketToken")]))
]),
- Node(name: "DiscardAssignmentExpr",
- nameForDiagnostics: nil,
+ Node(name: "ClosureExpr",
+ nameForDiagnostics: "closure",
kind: "Expr",
+ traits: [
+ "Braced",
+ "WithStatements"
+ ],
children: [
- Child(name: "Wildcard",
- kind: .token(choices: [.token(tokenKind: "WildcardToken")]))
+ Child(name: "LeftBrace",
+ kind: .token(choices: [.token(tokenKind: "LeftBraceToken")])),
+ Child(name: "Signature",
+ kind: .node(kind: "ClosureSignature"),
+ isOptional: true),
+ Child(name: "Statements",
+ kind: .collection(kind: "CodeBlockItemList", collectionElementName: "Statement"),
+ isIndented: true),
+ Child(name: "RightBrace",
+ kind: .token(choices: [.token(tokenKind: "RightBraceToken")]),
+ requiresLeadingNewline: true)
]),
- Node(name: "AssignmentExpr",
+ Node(name: "ClosureParamList",
nameForDiagnostics: nil,
- kind: "Expr",
- children: [
- Child(name: "AssignToken",
- kind: .token(choices: [.token(tokenKind: "EqualToken")]))
- ]),
+ kind: "SyntaxCollection",
+ element: "ClosureParam"),
- Node(name: "PackExpansionExpr",
- nameForDiagnostics: nil,
- kind: "Expr",
+ Node(name: "ClosureParam",
+ nameForDiagnostics: "closure parameter",
+ kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
children: [
- Child(name: "RepeatKeyword",
- kind: .token(choices: [.keyword(text: "repeat")])),
- Child(name: "PatternExpr",
- kind: .node(kind: "Expr"))
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "WildcardToken")]),
+ nameForDiagnostics: "name"),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
]),
- Node(name: "PackElementExpr",
- nameForDiagnostics: nil,
- kind: "Expr",
+ Node(name: "ClosureSignature",
+ nameForDiagnostics: "closure signature",
+ kind: "Syntax",
+ traits: [
+ "Attributed"
+ ],
children: [
- Child(name: "EachKeyword",
- kind: .token(choices: [.keyword(text: "each")])),
- Child(name: "PackRefExpr",
- kind: .node(kind: "Expr"))
- ]),
-
- Node(name: "SequenceExpr",
- nameForDiagnostics: nil,
- kind: "Expr",
- children: [
- Child(name: "Elements",
- kind: .collection(kind: "ExprList", collectionElementName: "Element"))
- ]),
-
- Node(name: "ExprList",
- nameForDiagnostics: nil,
- description: "A list of expressions connected by operators. This list is contained by a `SequenceExprSyntax`.",
- kind: "SyntaxCollection",
- element: "Expr",
- elementName: "Expression"),
-
- Node(name: "PrefixOperatorExpr",
- nameForDiagnostics: "operator",
- kind: "Expr",
- children: [
- Child(name: "OperatorToken",
- kind: .token(choices: [.token(tokenKind: "PrefixOperatorToken")]),
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ nameForDiagnostics: "attributes",
+ isOptional: true),
+ Child(name: "Capture",
+ kind: .node(kind: "ClosureCaptureSignature"),
+ isOptional: true),
+ Child(name: "Input",
+ kind: .nodeChoices(choices: [
+ Child(name: "SimpleInput",
+ kind: .node(kind: "ClosureParamList")),
+ Child(name: "Input",
+ kind: .node(kind: "ParameterClause"))
+ ]),
isOptional: true),
- Child(name: "PostfixExpression",
- kind: .node(kind: "Expr"))
- ]),
-
- Node(name: "BinaryOperatorExpr",
- nameForDiagnostics: "operator",
- kind: "Expr",
- children: [
- Child(name: "OperatorToken",
- kind: .token(choices: [.token(tokenKind: "BinaryOperatorToken")]))
- ]),
-
- Node(name: "ArrowExpr",
- nameForDiagnostics: nil,
- kind: "Expr",
- children: [
Child(name: "EffectSpecifiers",
kind: .node(kind: "TypeEffectSpecifiers"),
isOptional: true),
- Child(name: "ArrowToken",
- kind: .token(choices: [.token(tokenKind: "ArrowToken")]))
+ Child(name: "Output",
+ kind: .node(kind: "ReturnClause"),
+ isOptional: true),
+ Child(name: "InTok",
+ kind: .token(choices: [.keyword(text: "in")]))
]),
- Node(name: "InfixOperatorExpr",
+ Node(name: "DeclNameArgumentList",
nameForDiagnostics: nil,
- kind: "Expr",
- children: [
- Child(name: "LeftOperand",
- kind: .node(kind: "Expr")),
- Child(name: "OperatorOperand",
- kind: .node(kind: "Expr")),
- Child(name: "RightOperand",
- kind: .node(kind: "Expr"))
- ]),
+ kind: "SyntaxCollection",
+ element: "DeclNameArgument"),
- Node(name: "FloatLiteralExpr",
- nameForDiagnostics: "floating literal",
- kind: "Expr",
+ Node(name: "DeclNameArgument",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
children: [
- Child(name: "FloatingDigits",
- kind: .token(choices: [.token(tokenKind: "FloatingLiteralToken")]))
+ Child(name: "Name",
+ kind: .node(kind: "Token")),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")], requiresTrailingSpace: false))
]),
- Node(name: "TupleExpr",
- nameForDiagnostics: "tuple",
- kind: "Expr",
+ Node(name: "DeclNameArguments",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
traits: [
"Parenthesized"
],
children: [
Child(name: "LeftParen",
kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "ElementList",
- kind: .collection(kind: "TupleExprElementList", collectionElementName: "Element"),
- isIndented: true),
+ Child(name: "Arguments",
+ kind: .collection(kind: "DeclNameArgumentList", collectionElementName: "Argument")),
Child(name: "RightParen",
kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
]),
- Node(name: "ArrayExpr",
- nameForDiagnostics: "array",
- kind: "Expr",
+ Node(name: "DictionaryElementList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "DictionaryElement"),
+
+ Node(name: "DictionaryElement",
+ nameForDiagnostics: "dictionary element",
+ kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
children: [
- Child(name: "LeftSquare",
- kind: .token(choices: [.token(tokenKind: "LeftSquareBracketToken")])),
- Child(name: "Elements",
- kind: .collection(kind: "ArrayElementList", collectionElementName: "Element"),
+ Child(name: "KeyExpression",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "key"),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "ValueExpression",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "value",
isIndented: true),
- Child(name: "RightSquare",
- kind: .token(choices: [.token(tokenKind: "RightSquareBracketToken")]))
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
]),
Node(name: "DictionaryExpr",
@@ -293,254 +338,165 @@ public let EXPR_NODES: [Node] = [
kind: .token(choices: [.token(tokenKind: "RightSquareBracketToken")]))
]),
- Node(name: "TupleExprElement",
+ Node(name: "DiscardAssignmentExpr",
nameForDiagnostics: nil,
- kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
+ kind: "Expr",
children: [
- Child(name: "Label",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "WildcardToken")]),
- nameForDiagnostics: "label",
- isOptional: true),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")]),
- isOptional: true),
- Child(name: "Expression",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "value"),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
+ Child(name: "Wildcard",
+ kind: .token(choices: [.token(tokenKind: "WildcardToken")]))
]),
- Node(name: "ArrayElement",
- nameForDiagnostics: "array element",
- kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
+ Node(name: "EditorPlaceholderExpr",
+ nameForDiagnostics: "editor placeholder",
+ kind: "Expr",
children: [
- Child(name: "Expression",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "value"),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
+ Child(name: "Identifier",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]))
]),
- Node(name: "DictionaryElement",
- nameForDiagnostics: "dictionary element",
+ Node(name: "ExprList",
+ nameForDiagnostics: nil,
+ description: "A list of expressions connected by operators. This list is contained by a `SequenceExprSyntax`.",
+ kind: "SyntaxCollection",
+ element: "Expr",
+ elementName: "Expression"),
+
+ Node(name: "ExpressionSegment",
+ nameForDiagnostics: nil,
kind: "Syntax",
traits: [
- "WithTrailingComma"
+ "Parenthesized"
],
children: [
- Child(name: "KeyExpression",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "key"),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "ValueExpression",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "value",
- isIndented: true),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
+ Child(name: "Backslash",
+ kind: .token(choices: [.token(tokenKind: "BackslashToken")])),
+ Child(name: "Delimiter",
+ kind: .token(choices: [.token(tokenKind: "RawStringDelimiterToken")]),
+ isOptional: true),
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
+ classification: "StringInterpolationAnchor",
+ forceClassification: true),
+ Child(name: "Expressions",
+ kind: .collection(kind: "TupleExprElementList", collectionElementName: "Expression")),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
+ classification: "StringInterpolationAnchor",
+ forceClassification: true)
]),
- Node(name: "IntegerLiteralExpr",
- nameForDiagnostics: "integer literal",
+ Node(name: "FloatLiteralExpr",
+ nameForDiagnostics: "floating literal",
kind: "Expr",
children: [
- Child(name: "Digits",
- kind: .token(choices: [.token(tokenKind: "IntegerLiteralToken")]))
+ Child(name: "FloatingDigits",
+ kind: .token(choices: [.token(tokenKind: "FloatingLiteralToken")]))
]),
- Node(name: "BooleanLiteralExpr",
- nameForDiagnostics: "bool literal",
+ Node(name: "ForcedValueExpr",
+ nameForDiagnostics: "force unwrap",
kind: "Expr",
children: [
- Child(name: "BooleanLiteral",
- kind: .token(choices: [.keyword(text: "true"), .keyword(text: "false")]))
+ Child(name: "Expression",
+ kind: .node(kind: "Expr")),
+ Child(name: "ExclamationMark",
+ kind: .token(choices: [.token(tokenKind: "ExclamationMarkToken")]))
]),
- Node(name: "IfExpr",
- nameForDiagnostics: "'if' statement",
+ Node(name: "FunctionCallExpr",
+ nameForDiagnostics: "function call",
kind: "Expr",
- traits: [
- "WithCodeBlock"
- ],
children: [
- Child(name: "IfKeyword",
- kind: .token(choices: [.keyword(text: "if")])),
- Child(name: "Conditions",
- kind: .collection(kind: "ConditionElementList", collectionElementName: "Condition")),
- Child(name: "Body",
- kind: .node(kind: "CodeBlock"),
- nameForDiagnostics: "body"),
- Child(name: "ElseKeyword",
- kind: .node(kind: "ElseToken"),
+ Child(name: "CalledExpression",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "called expression"),
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
isOptional: true),
- Child(name: "ElseBody",
- kind: .nodeChoices(choices: [
- Child(name: "IfExpr",
- kind: .node(kind: "IfExpr")),
- Child(name: "CodeBlock",
- kind: .node(kind: "CodeBlock"))
- ]),
- nameForDiagnostics: "else body",
- isOptional: true)
- ]),
-
- Node(name: "SwitchExpr",
- nameForDiagnostics: "'switch' statement",
- kind: "Expr",
- traits: [
- "Braced"
- ],
- children: [
- Child(name: "SwitchKeyword",
- kind: .token(choices: [.keyword(text: "switch")])),
- Child(name: "Expression",
- kind: .node(kind: "Expr")),
- Child(name: "LeftBrace",
- kind: .token(choices: [.token(tokenKind: "LeftBraceToken")])),
- Child(name: "Cases",
- kind: .collection(kind: "SwitchCaseList", collectionElementName: "Case")),
- Child(name: "RightBrace",
- kind: .token(choices: [.token(tokenKind: "RightBraceToken")]),
- requiresLeadingNewline: true)
- ]),
-
- Node(name: "SwitchCaseList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "Syntax",
- elementName: "SwitchCase",
- elementChoices: ["SwitchCase", "IfConfigDecl"],
- elementsSeparatedByNewline: true),
-
- Node(name: "SwitchCase",
- nameForDiagnostics: "switch case",
- kind: "Syntax",
- traits: [
- "WithStatements"
- ],
- parserFunction: "parseSwitchCase",
- children: [
- Child(name: "UnknownAttr",
- kind: .node(kind: "Attribute"),
+ Child(name: "ArgumentList",
+ kind: .collection(kind: "TupleExprElementList", collectionElementName: "Argument"),
+ nameForDiagnostics: "arguments",
+ isIndented: true),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
isOptional: true),
- Child(name: "Label",
- kind: .nodeChoices(choices: [
- Child(name: "Default",
- kind: .node(kind: "SwitchDefaultLabel")),
- Child(name: "Case",
- kind: .node(kind: "SwitchCaseLabel"))
- ]),
- nameForDiagnostics: "label"),
- Child(name: "Statements",
- kind: .collection(kind: "CodeBlockItemList", collectionElementName: "Statement"),
- isIndented: true)
- ]),
-
- Node(name: "SwitchCaseLabel",
- nameForDiagnostics: nil,
- kind: "Syntax",
- children: [
- Child(name: "CaseKeyword",
- kind: .token(choices: [.keyword(text: "case")])),
- Child(name: "CaseItems",
- kind: .collection(kind: "CaseItemList", collectionElementName: "CaseItem")),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")], requiresTrailingSpace: false))
+ Child(name: "TrailingClosure",
+ kind: .node(kind: "ClosureExpr"),
+ nameForDiagnostics: "trailing closure",
+ isOptional: true),
+ Child(name: "AdditionalTrailingClosures",
+ kind: .collection(kind: "MultipleTrailingClosureElementList", collectionElementName: "AdditionalTrailingClosure"),
+ nameForDiagnostics: "trailing closures",
+ isOptional: true)
]),
- Node(name: "SwitchDefaultLabel",
+ Node(name: "IdentifierExpr",
nameForDiagnostics: nil,
- kind: "Syntax",
+ kind: "Expr",
children: [
- Child(name: "DefaultKeyword",
- kind: .token(choices: [.keyword(text: "default")])),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")], requiresTrailingSpace: false))
+ Child(name: "Identifier",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken"), .token(tokenKind: "DollarIdentifierToken"), .token(tokenKind: "BinaryOperatorToken")])),
+ Child(name: "DeclNameArguments",
+ kind: .node(kind: "DeclNameArguments"),
+ isOptional: true)
]),
- Node(name: "CaseItem",
- nameForDiagnostics: nil,
- kind: "Syntax",
+ Node(name: "IfExpr",
+ nameForDiagnostics: "'if' statement",
+ kind: "Expr",
traits: [
- "WithTrailingComma"
+ "WithCodeBlock"
],
children: [
- Child(name: "Pattern",
- kind: .node(kind: "Pattern")),
- Child(name: "WhereClause",
- kind: .node(kind: "WhereClause"),
+ Child(name: "IfKeyword",
+ kind: .token(choices: [.keyword(text: "if")])),
+ Child(name: "Conditions",
+ kind: .collection(kind: "ConditionElementList", collectionElementName: "Condition")),
+ Child(name: "Body",
+ kind: .node(kind: "CodeBlock"),
+ nameForDiagnostics: "body"),
+ Child(name: "ElseKeyword",
+ kind: .node(kind: "ElseToken"),
isOptional: true),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ Child(name: "ElseBody",
+ kind: .nodeChoices(choices: [
+ Child(name: "IfExpr",
+ kind: .node(kind: "IfExpr")),
+ Child(name: "CodeBlock",
+ kind: .node(kind: "CodeBlock"))
+ ]),
+ nameForDiagnostics: "else body",
isOptional: true)
]),
- Node(name: "UnresolvedTernaryExpr",
- nameForDiagnostics: "ternary operator",
- kind: "Expr",
- children: [
- Child(name: "QuestionMark",
- kind: .token(choices: [.token(tokenKind: "InfixQuestionMarkToken")])),
- Child(name: "FirstChoice",
- kind: .node(kind: "Expr")),
- Child(name: "ColonMark",
- kind: .token(choices: [.token(tokenKind: "ColonToken")]))
- ]),
-
- Node(name: "TernaryExpr",
- nameForDiagnostics: "ternay expression",
+ Node(name: "InOutExpr",
+ nameForDiagnostics: "inout expression",
kind: "Expr",
children: [
- Child(name: "ConditionExpression",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "condition"),
- Child(name: "QuestionMark",
- kind: .token(choices: [.token(tokenKind: "InfixQuestionMarkToken")])),
- Child(name: "FirstChoice",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "first choice"),
- Child(name: "ColonMark",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "SecondChoice",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "second choice")
+ Child(name: "Ampersand",
+ kind: .token(choices: [.token(tokenKind: "PrefixAmpersandToken")])),
+ Child(name: "Expression",
+ kind: .node(kind: "Expr"))
]),
- Node(name: "MemberAccessExpr",
- nameForDiagnostics: "member access",
+ Node(name: "InfixOperatorExpr",
+ nameForDiagnostics: nil,
kind: "Expr",
children: [
- Child(name: "Base",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "base",
- isOptional: true),
- Child(name: "Dot",
- kind: .token(choices: [.token(tokenKind: "PeriodToken")])),
- Child(name: "Name",
- kind: .node(kind: "Token"),
- nameForDiagnostics: "name"),
- Child(name: "DeclNameArguments",
- kind: .node(kind: "DeclNameArguments"),
- isOptional: true)
+ Child(name: "LeftOperand",
+ kind: .node(kind: "Expr")),
+ Child(name: "OperatorOperand",
+ kind: .node(kind: "Expr")),
+ Child(name: "RightOperand",
+ kind: .node(kind: "Expr"))
]),
- Node(name: "UnresolvedIsExpr",
- nameForDiagnostics: "'is'",
+ Node(name: "IntegerLiteralExpr",
+ nameForDiagnostics: "integer literal",
kind: "Expr",
children: [
- Child(name: "IsTok",
- kind: .token(choices: [.keyword(text: "is")]))
+ Child(name: "Digits",
+ kind: .token(choices: [.token(tokenKind: "IntegerLiteralToken")]))
]),
Node(name: "IsExpr",
@@ -555,179 +511,142 @@ public let EXPR_NODES: [Node] = [
kind: .node(kind: "Type"))
]),
- Node(name: "UnresolvedAsExpr",
- nameForDiagnostics: "'as'",
- kind: "Expr",
- children: [
- Child(name: "AsTok",
- kind: .token(choices: [.keyword(text: "as")])),
- Child(name: "QuestionOrExclamationMark",
- kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken"), .token(tokenKind: "ExclamationMarkToken")]),
- isOptional: true)
- ]),
+ Node(name: "KeyPathComponentList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "KeyPathComponent"),
- Node(name: "AsExpr",
- nameForDiagnostics: "'as'",
- kind: "Expr",
+ Node(name: "KeyPathComponent",
+ nameForDiagnostics: "key path component",
+ kind: "Syntax",
children: [
- Child(name: "Expression",
- kind: .node(kind: "Expr")),
- Child(name: "AsTok",
- kind: .token(choices: [.keyword(text: "as")])),
- Child(name: "QuestionOrExclamationMark",
- kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken"), .token(tokenKind: "ExclamationMarkToken")]),
+ Child(name: "Period",
+ kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
isOptional: true),
- Child(name: "TypeName",
- kind: .node(kind: "Type"))
+ Child(name: "Component",
+ kind: .nodeChoices(choices: [
+ Child(name: "Property",
+ kind: .node(kind: "KeyPathPropertyComponent")),
+ Child(name: "Subscript",
+ kind: .node(kind: "KeyPathSubscriptComponent")),
+ Child(name: "Optional",
+ kind: .node(kind: "KeyPathOptionalComponent"))
+ ]))
]),
- Node(name: "TypeExpr",
- nameForDiagnostics: nil,
+ Node(name: "KeyPathExpr",
+ nameForDiagnostics: "key path",
kind: "Expr",
children: [
- Child(name: "Type",
- kind: .node(kind: "Type"))
+ Child(name: "Backslash",
+ kind: .token(choices: [.token(tokenKind: "BackslashToken")])),
+ Child(name: "Root",
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "root",
+ isOptional: true),
+ Child(name: "Components",
+ kind: .collection(kind: "KeyPathComponentList", collectionElementName: "KeyPathComponent"))
]),
- Node(name: "ClosureCaptureItemSpecifier",
- nameForDiagnostics: "closure capture specifier",
+ Node(name: "KeyPathOptionalComponent",
+ nameForDiagnostics: "key path optional component",
kind: "Syntax",
children: [
- Child(name: "Specifier",
- kind: .token(choices: [.keyword(text: "weak"), .keyword(text: "unowned")])),
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
- isOptional: true),
- Child(name: "Detail",
- kind: .token(choices: [.keyword(text: "safe"), .keyword(text: "unsafe")]),
- isOptional: true),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
- isOptional: true)
+ Child(name: "QuestionOrExclamationMark",
+ kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken"), .token(tokenKind: "ExclamationMarkToken")]))
]),
- Node(name: "ClosureCaptureItem",
- nameForDiagnostics: "closure capture item",
+ Node(name: "KeyPathPropertyComponent",
+ nameForDiagnostics: "key path property component",
kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
children: [
- Child(name: "Specifier",
- kind: .node(kind: "ClosureCaptureItemSpecifier"),
- isOptional: true),
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- isOptional: true),
- Child(name: "AssignToken",
- kind: .token(choices: [.token(tokenKind: "EqualToken")]),
+ Child(name: "Identifier",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken"), .token(tokenKind: "DollarIdentifierToken"), .token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "IntegerLiteralToken")])),
+ Child(name: "DeclNameArguments",
+ kind: .node(kind: "DeclNameArguments"),
isOptional: true),
- Child(name: "Expression",
- kind: .node(kind: "Expr")),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ Child(name: "GenericArgumentClause",
+ kind: .node(kind: "GenericArgumentClause"),
isOptional: true)
]),
- Node(name: "ClosureCaptureItemList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "ClosureCaptureItem"),
-
- Node(name: "ClosureCaptureSignature",
- nameForDiagnostics: "closure capture signature",
+ Node(name: "KeyPathSubscriptComponent",
+ nameForDiagnostics: "key path subscript component",
kind: "Syntax",
children: [
- Child(name: "LeftSquare",
+ Child(name: "LeftBracket",
kind: .token(choices: [.token(tokenKind: "LeftSquareBracketToken")])),
- Child(name: "Items",
- kind: .collection(kind: "ClosureCaptureItemList", collectionElementName: "Item"),
- isOptional: true),
- Child(name: "RightSquare",
+ Child(name: "ArgumentList",
+ kind: .collection(kind: "TupleExprElementList", collectionElementName: "Argument"),
+ nameForDiagnostics: "arguments"),
+ Child(name: "RightBracket",
kind: .token(choices: [.token(tokenKind: "RightSquareBracketToken")]))
]),
- Node(name: "ClosureParam",
- nameForDiagnostics: "closure parameter",
- kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
- children: [
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "WildcardToken")]),
- nameForDiagnostics: "name"),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
- ]),
-
- Node(name: "ClosureParamList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "ClosureParam"),
-
- Node(name: "ClosureSignature",
- nameForDiagnostics: "closure signature",
- kind: "Syntax",
+ Node(name: "MacroExpansionExpr",
+ nameForDiagnostics: "macro expansion",
+ kind: "Expr",
traits: [
- "Attributed"
+ "FreestandingMacroExpansion"
],
children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- nameForDiagnostics: "attributes",
- isOptional: true),
- Child(name: "Capture",
- kind: .node(kind: "ClosureCaptureSignature"),
+ Child(name: "PoundToken",
+ kind: .token(choices: [.token(tokenKind: "PoundToken")]),
+ description: "The `#` sign."),
+ Child(name: "Macro",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
+ Child(name: "GenericArguments",
+ kind: .node(kind: "GenericArgumentClause"),
isOptional: true),
- Child(name: "Input",
- kind: .nodeChoices(choices: [
- Child(name: "SimpleInput",
- kind: .node(kind: "ClosureParamList")),
- Child(name: "Input",
- kind: .node(kind: "ParameterClause"))
- ]),
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
isOptional: true),
- Child(name: "EffectSpecifiers",
- kind: .node(kind: "TypeEffectSpecifiers"),
+ Child(name: "ArgumentList",
+ kind: .collection(kind: "TupleExprElementList", collectionElementName: "Argument")),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
isOptional: true),
- Child(name: "Output",
- kind: .node(kind: "ReturnClause"),
+ Child(name: "TrailingClosure",
+ kind: .node(kind: "ClosureExpr"),
isOptional: true),
- Child(name: "InTok",
- kind: .token(choices: [.keyword(text: "in")]))
+ Child(name: "AdditionalTrailingClosures",
+ kind: .collection(kind: "MultipleTrailingClosureElementList", collectionElementName: "AdditionalTrailingClosure"),
+ isOptional: true)
]),
- Node(name: "ClosureExpr",
- nameForDiagnostics: "closure",
+ Node(name: "MemberAccessExpr",
+ nameForDiagnostics: "member access",
kind: "Expr",
- traits: [
- "Braced",
- "WithStatements"
- ],
children: [
- Child(name: "LeftBrace",
- kind: .token(choices: [.token(tokenKind: "LeftBraceToken")])),
- Child(name: "Signature",
- kind: .node(kind: "ClosureSignature"),
+ Child(name: "Base",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "base",
isOptional: true),
- Child(name: "Statements",
- kind: .collection(kind: "CodeBlockItemList", collectionElementName: "Statement"),
- isIndented: true),
- Child(name: "RightBrace",
- kind: .token(choices: [.token(tokenKind: "RightBraceToken")]),
- requiresLeadingNewline: true)
+ Child(name: "Dot",
+ kind: .token(choices: [.token(tokenKind: "PeriodToken")])),
+ Child(name: "Name",
+ kind: .node(kind: "Token"),
+ nameForDiagnostics: "name"),
+ Child(name: "DeclNameArguments",
+ kind: .node(kind: "DeclNameArguments"),
+ isOptional: true)
]),
- Node(name: "UnresolvedPatternExpr",
- nameForDiagnostics: nil,
+ Node(name: "MoveExpr",
+ nameForDiagnostics: "'_move' expression",
kind: "Expr",
children: [
- Child(name: "Pattern",
- kind: .node(kind: "Pattern"))
+ Child(name: "MoveKeyword",
+ kind: .token(choices: [.keyword(text: "_move")])),
+ Child(name: "Expression",
+ kind: .node(kind: "Expr"))
]),
+ Node(name: "MultipleTrailingClosureElementList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "MultipleTrailingClosureElement"),
+
Node(name: "MultipleTrailingClosureElement",
nameForDiagnostics: "trailing closure",
kind: "Syntax",
@@ -741,38 +660,135 @@ public let EXPR_NODES: [Node] = [
kind: .node(kind: "ClosureExpr"))
]),
- Node(name: "MultipleTrailingClosureElementList",
+ Node(name: "NilLiteralExpr",
nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "MultipleTrailingClosureElement"),
+ kind: "Expr",
+ children: [
+ Child(name: "NilKeyword",
+ kind: .token(choices: [.keyword(text: "nil")]))
+ ]),
- Node(name: "FunctionCallExpr",
- nameForDiagnostics: "function call",
+ Node(name: "OptionalChainingExpr",
+ nameForDiagnostics: "optional chaining",
kind: "Expr",
children: [
- Child(name: "CalledExpression",
+ Child(name: "Expression",
+ kind: .node(kind: "Expr")),
+ Child(name: "QuestionMark",
+ kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken")]))
+ ]),
+
+ Node(name: "PackElementExpr",
+ nameForDiagnostics: nil,
+ kind: "Expr",
+ children: [
+ Child(name: "EachKeyword",
+ kind: .token(choices: [.keyword(text: "each")])),
+ Child(name: "PackRefExpr",
+ kind: .node(kind: "Expr"))
+ ]),
+
+ Node(name: "PackExpansionExpr",
+ nameForDiagnostics: nil,
+ kind: "Expr",
+ children: [
+ Child(name: "RepeatKeyword",
+ kind: .token(choices: [.keyword(text: "repeat")])),
+ Child(name: "PatternExpr",
+ kind: .node(kind: "Expr"))
+ ]),
+
+ Node(name: "PostfixIfConfigExpr",
+ nameForDiagnostics: nil,
+ kind: "Expr",
+ children: [
+ Child(name: "Base",
kind: .node(kind: "Expr"),
- nameForDiagnostics: "called expression"),
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
isOptional: true),
- Child(name: "ArgumentList",
- kind: .collection(kind: "TupleExprElementList", collectionElementName: "Argument"),
- nameForDiagnostics: "arguments",
- isIndented: true),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
+ Child(name: "Config",
+ kind: .node(kind: "IfConfigDecl"))
+ ]),
+
+ Node(name: "PostfixUnaryExpr",
+ nameForDiagnostics: "postfix expression",
+ kind: "Expr",
+ children: [
+ Child(name: "Expression",
+ kind: .node(kind: "Expr")),
+ Child(name: "OperatorToken",
+ kind: .token(choices: [.token(tokenKind: "PostfixOperatorToken")]))
+ ]),
+
+ Node(name: "PrefixOperatorExpr",
+ nameForDiagnostics: "operator",
+ kind: "Expr",
+ children: [
+ Child(name: "OperatorToken",
+ kind: .token(choices: [.token(tokenKind: "PrefixOperatorToken")]),
isOptional: true),
- Child(name: "TrailingClosure",
- kind: .node(kind: "ClosureExpr"),
- nameForDiagnostics: "trailing closure",
+ Child(name: "PostfixExpression",
+ kind: .node(kind: "Expr"))
+ ]),
+
+ Node(name: "RegexLiteralExpr",
+ nameForDiagnostics: "regex literal",
+ kind: "Expr",
+ children: [
+ Child(name: "Regex",
+ kind: .token(choices: [.token(tokenKind: "RegexLiteralToken")]))
+ ]),
+
+ Node(name: "SequenceExpr",
+ nameForDiagnostics: nil,
+ kind: "Expr",
+ children: [
+ Child(name: "Elements",
+ kind: .collection(kind: "ExprList", collectionElementName: "Element"))
+ ]),
+
+ Node(name: "SpecializeExpr",
+ nameForDiagnostics: nil,
+ kind: "Expr",
+ children: [
+ Child(name: "Expression",
+ kind: .node(kind: "Expr")),
+ Child(name: "GenericArgumentClause",
+ kind: .node(kind: "GenericArgumentClause"))
+ ]),
+
+ Node(name: "StringLiteralExpr",
+ nameForDiagnostics: "string literal",
+ kind: "Expr",
+ children: [
+ Child(name: "OpenDelimiter",
+ kind: .token(choices: [.token(tokenKind: "RawStringDelimiterToken")]),
isOptional: true),
- Child(name: "AdditionalTrailingClosures",
- kind: .collection(kind: "MultipleTrailingClosureElementList", collectionElementName: "AdditionalTrailingClosure"),
- nameForDiagnostics: "trailing closures",
+ Child(name: "OpenQuote",
+ kind: .token(choices: [.token(tokenKind: "StringQuoteToken"), .token(tokenKind: "MultilineStringQuoteToken"), .token(tokenKind: "SingleQuoteToken")])),
+ Child(name: "Segments",
+ kind: .collection(kind: "StringLiteralSegments", collectionElementName: "Segment")),
+ Child(name: "CloseQuote",
+ kind: .token(choices: [.token(tokenKind: "StringQuoteToken"), .token(tokenKind: "MultilineStringQuoteToken"), .token(tokenKind: "SingleQuoteToken")])),
+ Child(name: "CloseDelimiter",
+ kind: .token(choices: [.token(tokenKind: "RawStringDelimiterToken")]),
isOptional: true)
]),
+ Node(name: "StringLiteralSegments",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "Syntax",
+ elementName: "Segment",
+ elementChoices: ["StringSegment", "ExpressionSegment"]),
+
+ Node(name: "StringSegment",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
+ children: [
+ Child(name: "Content",
+ kind: .token(choices: [.token(tokenKind: "StringSegmentToken")]))
+ ]),
+
Node(name: "SubscriptExpr",
nameForDiagnostics: "subscript",
kind: "Expr",
@@ -797,232 +813,210 @@ public let EXPR_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "OptionalChainingExpr",
- nameForDiagnostics: "optional chaining",
- kind: "Expr",
- children: [
- Child(name: "Expression",
- kind: .node(kind: "Expr")),
- Child(name: "QuestionMark",
- kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken")]))
- ]),
-
- Node(name: "ForcedValueExpr",
- nameForDiagnostics: "force unwrap",
- kind: "Expr",
- children: [
- Child(name: "Expression",
- kind: .node(kind: "Expr")),
- Child(name: "ExclamationMark",
- kind: .token(choices: [.token(tokenKind: "ExclamationMarkToken")]))
- ]),
-
- Node(name: "PostfixUnaryExpr",
- nameForDiagnostics: "postfix expression",
+ Node(name: "SuperRefExpr",
+ nameForDiagnostics: nil,
kind: "Expr",
children: [
- Child(name: "Expression",
- kind: .node(kind: "Expr")),
- Child(name: "OperatorToken",
- kind: .token(choices: [.token(tokenKind: "PostfixOperatorToken")]))
+ Child(name: "SuperKeyword",
+ kind: .token(choices: [.keyword(text: "super")]))
]),
- Node(name: "SpecializeExpr",
+ Node(name: "SwitchCaseLabel",
nameForDiagnostics: nil,
- kind: "Expr",
+ kind: "Syntax",
children: [
- Child(name: "Expression",
- kind: .node(kind: "Expr")),
- Child(name: "GenericArgumentClause",
- kind: .node(kind: "GenericArgumentClause"))
+ Child(name: "CaseKeyword",
+ kind: .token(choices: [.keyword(text: "case")])),
+ Child(name: "CaseItems",
+ kind: .collection(kind: "CaseItemList", collectionElementName: "CaseItem")),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")], requiresTrailingSpace: false))
]),
- Node(name: "StringSegment",
+ Node(name: "SwitchCaseList",
nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "Syntax",
+ elementName: "SwitchCase",
+ elementChoices: ["SwitchCase", "IfConfigDecl"],
+ elementsSeparatedByNewline: true),
+
+ Node(name: "SwitchCase",
+ nameForDiagnostics: "switch case",
kind: "Syntax",
+ traits: [
+ "WithStatements"
+ ],
+ parserFunction: "parseSwitchCase",
children: [
- Child(name: "Content",
- kind: .token(choices: [.token(tokenKind: "StringSegmentToken")]))
+ Child(name: "UnknownAttr",
+ kind: .node(kind: "Attribute"),
+ isOptional: true),
+ Child(name: "Label",
+ kind: .nodeChoices(choices: [
+ Child(name: "Default",
+ kind: .node(kind: "SwitchDefaultLabel")),
+ Child(name: "Case",
+ kind: .node(kind: "SwitchCaseLabel"))
+ ]),
+ nameForDiagnostics: "label"),
+ Child(name: "Statements",
+ kind: .collection(kind: "CodeBlockItemList", collectionElementName: "Statement"),
+ isIndented: true)
]),
- Node(name: "ExpressionSegment",
+ Node(name: "SwitchDefaultLabel",
nameForDiagnostics: nil,
kind: "Syntax",
- traits: [
- "Parenthesized"
- ],
children: [
- Child(name: "Backslash",
- kind: .token(choices: [.token(tokenKind: "BackslashToken")])),
- Child(name: "Delimiter",
- kind: .token(choices: [.token(tokenKind: "RawStringDelimiterToken")]),
- isOptional: true),
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
- classification: "StringInterpolationAnchor",
- forceClassification: true),
- Child(name: "Expressions",
- kind: .collection(kind: "TupleExprElementList", collectionElementName: "Expression")),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
- classification: "StringInterpolationAnchor",
- forceClassification: true)
+ Child(name: "DefaultKeyword",
+ kind: .token(choices: [.keyword(text: "default")])),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")], requiresTrailingSpace: false))
]),
- Node(name: "StringLiteralExpr",
- nameForDiagnostics: "string literal",
+ Node(name: "SwitchExpr",
+ nameForDiagnostics: "'switch' statement",
kind: "Expr",
+ traits: [
+ "Braced"
+ ],
children: [
- Child(name: "OpenDelimiter",
- kind: .token(choices: [.token(tokenKind: "RawStringDelimiterToken")]),
- isOptional: true),
- Child(name: "OpenQuote",
- kind: .token(choices: [.token(tokenKind: "StringQuoteToken"), .token(tokenKind: "MultilineStringQuoteToken"), .token(tokenKind: "SingleQuoteToken")])),
- Child(name: "Segments",
- kind: .collection(kind: "StringLiteralSegments", collectionElementName: "Segment")),
- Child(name: "CloseQuote",
- kind: .token(choices: [.token(tokenKind: "StringQuoteToken"), .token(tokenKind: "MultilineStringQuoteToken"), .token(tokenKind: "SingleQuoteToken")])),
- Child(name: "CloseDelimiter",
- kind: .token(choices: [.token(tokenKind: "RawStringDelimiterToken")]),
- isOptional: true)
+ Child(name: "SwitchKeyword",
+ kind: .token(choices: [.keyword(text: "switch")])),
+ Child(name: "Expression",
+ kind: .node(kind: "Expr")),
+ Child(name: "LeftBrace",
+ kind: .token(choices: [.token(tokenKind: "LeftBraceToken")])),
+ Child(name: "Cases",
+ kind: .collection(kind: "SwitchCaseList", collectionElementName: "Case")),
+ Child(name: "RightBrace",
+ kind: .token(choices: [.token(tokenKind: "RightBraceToken")]),
+ requiresLeadingNewline: true)
]),
- Node(name: "RegexLiteralExpr",
- nameForDiagnostics: "regex literal",
+ Node(name: "TernaryExpr",
+ nameForDiagnostics: "ternay expression",
kind: "Expr",
children: [
- Child(name: "Regex",
- kind: .token(choices: [.token(tokenKind: "RegexLiteralToken")]))
+ Child(name: "ConditionExpression",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "condition"),
+ Child(name: "QuestionMark",
+ kind: .token(choices: [.token(tokenKind: "InfixQuestionMarkToken")])),
+ Child(name: "FirstChoice",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "first choice"),
+ Child(name: "ColonMark",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "SecondChoice",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "second choice")
]),
- Node(name: "KeyPathExpr",
- nameForDiagnostics: "key path",
+ Node(name: "TryExpr",
+ nameForDiagnostics: "'try' expression",
kind: "Expr",
children: [
- Child(name: "Backslash",
- kind: .token(choices: [.token(tokenKind: "BackslashToken")])),
- Child(name: "Root",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "root",
+ Child(name: "TryKeyword",
+ kind: .token(choices: [.keyword(text: "try")])),
+ Child(name: "QuestionOrExclamationMark",
+ kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken"), .token(tokenKind: "ExclamationMarkToken")], requiresTrailingSpace: true),
isOptional: true),
- Child(name: "Components",
- kind: .collection(kind: "KeyPathComponentList", collectionElementName: "KeyPathComponent"))
+ Child(name: "Expression",
+ kind: .node(kind: "Expr"))
]),
- Node(name: "KeyPathComponentList",
+ Node(name: "TupleExprElementList",
nameForDiagnostics: nil,
kind: "SyntaxCollection",
- element: "KeyPathComponent"),
+ element: "TupleExprElement"),
- Node(name: "KeyPathComponent",
- nameForDiagnostics: "key path component",
+ Node(name: "TupleExprElement",
+ nameForDiagnostics: nil,
kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
children: [
- Child(name: "Period",
- kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
+ Child(name: "Label",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "WildcardToken")]),
+ nameForDiagnostics: "label",
isOptional: true),
- Child(name: "Component",
- kind: .nodeChoices(choices: [
- Child(name: "Property",
- kind: .node(kind: "KeyPathPropertyComponent")),
- Child(name: "Subscript",
- kind: .node(kind: "KeyPathSubscriptComponent")),
- Child(name: "Optional",
- kind: .node(kind: "KeyPathOptionalComponent"))
- ]))
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")]),
+ isOptional: true),
+ Child(name: "Expression",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "value"),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
]),
- Node(name: "KeyPathPropertyComponent",
- nameForDiagnostics: "key path property component",
- kind: "Syntax",
+ Node(name: "TupleExpr",
+ nameForDiagnostics: "tuple",
+ kind: "Expr",
+ traits: [
+ "Parenthesized"
+ ],
children: [
- Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken"), .token(tokenKind: "DollarIdentifierToken"), .token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "IntegerLiteralToken")])),
- Child(name: "DeclNameArguments",
- kind: .node(kind: "DeclNameArguments"),
- isOptional: true),
- Child(name: "GenericArgumentClause",
- kind: .node(kind: "GenericArgumentClause"),
- isOptional: true)
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
+ Child(name: "ElementList",
+ kind: .collection(kind: "TupleExprElementList", collectionElementName: "Element"),
+ isIndented: true),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
]),
- Node(name: "KeyPathSubscriptComponent",
- nameForDiagnostics: "key path subscript component",
- kind: "Syntax",
+ Node(name: "TypeExpr",
+ nameForDiagnostics: nil,
+ kind: "Expr",
children: [
- Child(name: "LeftBracket",
- kind: .token(choices: [.token(tokenKind: "LeftSquareBracketToken")])),
- Child(name: "ArgumentList",
- kind: .collection(kind: "TupleExprElementList", collectionElementName: "Argument"),
- nameForDiagnostics: "arguments"),
- Child(name: "RightBracket",
- kind: .token(choices: [.token(tokenKind: "RightSquareBracketToken")]))
+ Child(name: "Type",
+ kind: .node(kind: "Type"))
]),
- Node(name: "KeyPathOptionalComponent",
- nameForDiagnostics: "key path optional component",
- kind: "Syntax",
+ Node(name: "UnresolvedAsExpr",
+ nameForDiagnostics: "'as'",
+ kind: "Expr",
children: [
+ Child(name: "AsTok",
+ kind: .token(choices: [.keyword(text: "as")])),
Child(name: "QuestionOrExclamationMark",
- kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken"), .token(tokenKind: "ExclamationMarkToken")]))
+ kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken"), .token(tokenKind: "ExclamationMarkToken")]),
+ isOptional: true)
]),
- Node(name: "MacroExpansionExpr",
- nameForDiagnostics: "macro expansion",
+ Node(name: "UnresolvedIsExpr",
+ nameForDiagnostics: "'is'",
kind: "Expr",
- traits: [
- "FreestandingMacroExpansion"
- ],
children: [
- Child(name: "PoundToken",
- kind: .token(choices: [.token(tokenKind: "PoundToken")]),
- description: "The `#` sign."),
- Child(name: "Macro",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
- Child(name: "GenericArguments",
- kind: .node(kind: "GenericArgumentClause"),
- isOptional: true),
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")]),
- isOptional: true),
- Child(name: "ArgumentList",
- kind: .collection(kind: "TupleExprElementList", collectionElementName: "Argument")),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
- isOptional: true),
- Child(name: "TrailingClosure",
- kind: .node(kind: "ClosureExpr"),
- isOptional: true),
- Child(name: "AdditionalTrailingClosures",
- kind: .collection(kind: "MultipleTrailingClosureElementList", collectionElementName: "AdditionalTrailingClosure"),
- isOptional: true)
+ Child(name: "IsTok",
+ kind: .token(choices: [.keyword(text: "is")]))
]),
- Node(name: "PostfixIfConfigExpr",
+ Node(name: "UnresolvedPatternExpr",
nameForDiagnostics: nil,
kind: "Expr",
children: [
- Child(name: "Base",
- kind: .node(kind: "Expr"),
- isOptional: true),
- Child(name: "Config",
- kind: .node(kind: "IfConfigDecl"))
+ Child(name: "Pattern",
+ kind: .node(kind: "Pattern"))
]),
- Node(name: "EditorPlaceholderExpr",
- nameForDiagnostics: "editor placeholder",
+ Node(name: "UnresolvedTernaryExpr",
+ nameForDiagnostics: "ternary operator",
kind: "Expr",
children: [
- Child(name: "Identifier",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]))
+ Child(name: "QuestionMark",
+ kind: .token(choices: [.token(tokenKind: "InfixQuestionMarkToken")])),
+ Child(name: "FirstChoice",
+ kind: .node(kind: "Expr")),
+ Child(name: "ColonMark",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")]))
]),
- Node(name: "YieldExprList",
- nameForDiagnostics: "yield list",
- kind: "SyntaxCollection",
- element: "YieldExprListElement",
- elementName: "Yields"),
-
Node(name: "YieldExprListElement",
nameForDiagnostics: nil,
kind: "Syntax",
@@ -1034,4 +1028,10 @@ public let EXPR_NODES: [Node] = [
isOptional: true)
]),
+ Node(name: "YieldExprList",
+ nameForDiagnostics: "yield list",
+ kind: "SyntaxCollection",
+ element: "YieldExprListElement",
+ elementName: "Yields"),
+
]
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/GenericNodes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/GenericNodes.swift
index 09d57899d41..8e60d97f8a1 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/GenericNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/GenericNodes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,14 +13,67 @@
//===----------------------------------------------------------------------===//
public let GENERIC_NODES: [Node] = [
- Node(name: "GenericWhereClause",
- nameForDiagnostics: "'where' clause",
+ Node(name: "ConformanceRequirement",
+ nameForDiagnostics: "conformance requirement",
kind: "Syntax",
children: [
- Child(name: "WhereKeyword",
- kind: .token(choices: [.keyword(text: "where")])),
- Child(name: "RequirementList",
- kind: .collection(kind: "GenericRequirementList", collectionElementName: "Requirement"))
+ Child(name: "LeftTypeIdentifier",
+ kind: .node(kind: "Type")),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "RightTypeIdentifier",
+ kind: .node(kind: "Type"))
+ ]),
+
+ Node(name: "GenericParameterClause",
+ nameForDiagnostics: "generic parameter clause",
+ kind: "Syntax",
+ parserFunction: "parseGenericParameters",
+ children: [
+ Child(name: "LeftAngleBracket",
+ kind: .token(choices: [.token(tokenKind: "LeftAngleToken")])),
+ Child(name: "GenericParameterList",
+ kind: .collection(kind: "GenericParameterList", collectionElementName: "GenericParameter")),
+ Child(name: "GenericWhereClause",
+ kind: .node(kind: "GenericWhereClause"),
+ isOptional: true),
+ Child(name: "RightAngleBracket",
+ kind: .token(choices: [.token(tokenKind: "RightAngleToken")]))
+ ]),
+
+ Node(name: "GenericParameterList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "GenericParameter"),
+
+ Node(name: "GenericParameter",
+ nameForDiagnostics: "generic parameter",
+ kind: "Syntax",
+ traits: [
+ "WithTrailingComma",
+ "Attributed"
+ ],
+ children: [
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ isOptional: true),
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
+ nameForDiagnostics: "name"),
+ Child(name: "Ellipsis",
+ kind: .token(choices: [.token(tokenKind: "EllipsisToken")]),
+ nameForDiagnostics: "parameter pack specifier",
+ isOptional: true),
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")]),
+ isOptional: true),
+ Child(name: "InheritedType",
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "inherited type",
+ isOptional: true),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
]),
Node(name: "GenericRequirementList",
@@ -50,18 +103,14 @@ public let GENERIC_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "SameTypeRequirement",
- nameForDiagnostics: "same type requirement",
+ Node(name: "GenericWhereClause",
+ nameForDiagnostics: "'where' clause",
kind: "Syntax",
children: [
- Child(name: "LeftTypeIdentifier",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "left-hand type"),
- Child(name: "EqualityToken",
- kind: .token(choices: [.token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "PrefixOperatorToken"), .token(tokenKind: "PostfixOperatorToken")])),
- Child(name: "RightTypeIdentifier",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "right-hand type")
+ Child(name: "WhereKeyword",
+ kind: .token(choices: [.keyword(text: "where")])),
+ Child(name: "RequirementList",
+ kind: .collection(kind: "GenericRequirementList", collectionElementName: "Requirement"))
]),
Node(name: "LayoutRequirement",
@@ -94,39 +143,16 @@ public let GENERIC_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "GenericParameterList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "GenericParameter"),
-
- Node(name: "GenericParameter",
- nameForDiagnostics: "generic parameter",
+ Node(name: "PrimaryAssociatedTypeClause",
+ nameForDiagnostics: "primary associated type clause",
kind: "Syntax",
- traits: [
- "WithTrailingComma",
- "Attributed"
- ],
children: [
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- isOptional: true),
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- nameForDiagnostics: "name"),
- Child(name: "Ellipsis",
- kind: .token(choices: [.token(tokenKind: "EllipsisToken")]),
- nameForDiagnostics: "parameter pack specifier",
- isOptional: true),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")]),
- isOptional: true),
- Child(name: "InheritedType",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "inherited type",
- isOptional: true),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
+ Child(name: "LeftAngleBracket",
+ kind: .token(choices: [.token(tokenKind: "LeftAngleToken")])),
+ Child(name: "PrimaryAssociatedTypeList",
+ kind: .collection(kind: "PrimaryAssociatedTypeList", collectionElementName: "PrimaryAssociatedType")),
+ Child(name: "RightAngleBracket",
+ kind: .token(choices: [.token(tokenKind: "RightAngleToken")]))
]),
Node(name: "PrimaryAssociatedTypeList",
@@ -149,44 +175,18 @@ public let GENERIC_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "GenericParameterClause",
- nameForDiagnostics: "generic parameter clause",
- kind: "Syntax",
- parserFunction: "parseGenericParameters",
- children: [
- Child(name: "LeftAngleBracket",
- kind: .token(choices: [.token(tokenKind: "LeftAngleToken")])),
- Child(name: "GenericParameterList",
- kind: .collection(kind: "GenericParameterList", collectionElementName: "GenericParameter")),
- Child(name: "GenericWhereClause",
- kind: .node(kind: "GenericWhereClause"),
- isOptional: true),
- Child(name: "RightAngleBracket",
- kind: .token(choices: [.token(tokenKind: "RightAngleToken")]))
- ]),
-
- Node(name: "ConformanceRequirement",
- nameForDiagnostics: "conformance requirement",
+ Node(name: "SameTypeRequirement",
+ nameForDiagnostics: "same type requirement",
kind: "Syntax",
children: [
Child(name: "LeftTypeIdentifier",
- kind: .node(kind: "Type")),
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "left-hand type"),
+ Child(name: "EqualityToken",
+ kind: .token(choices: [.token(tokenKind: "BinaryOperatorToken"), .token(tokenKind: "PrefixOperatorToken"), .token(tokenKind: "PostfixOperatorToken")])),
Child(name: "RightTypeIdentifier",
- kind: .node(kind: "Type"))
- ]),
-
- Node(name: "PrimaryAssociatedTypeClause",
- nameForDiagnostics: "primary associated type clause",
- kind: "Syntax",
- children: [
- Child(name: "LeftAngleBracket",
- kind: .token(choices: [.token(tokenKind: "LeftAngleToken")])),
- Child(name: "PrimaryAssociatedTypeList",
- kind: .collection(kind: "PrimaryAssociatedTypeList", collectionElementName: "PrimaryAssociatedType")),
- Child(name: "RightAngleBracket",
- kind: .token(choices: [.token(tokenKind: "RightAngleToken")]))
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "right-hand type")
]),
]
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/PatternNodes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/PatternNodes.swift
index 1a5ffb7da01..1c2b23753b2 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/PatternNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/PatternNodes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,24 +13,12 @@
//===----------------------------------------------------------------------===//
public let PATTERN_NODES: [Node] = [
- Node(name: "TypeAnnotation",
- nameForDiagnostics: "type annotation",
- kind: "Syntax",
- children: [
- Child(name: "Colon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "Type",
- kind: .node(kind: "Type"))
- ]),
-
- Node(name: "IsTypePattern",
- nameForDiagnostics: "'is' pattern",
+ Node(name: "ExpressionPattern",
+ nameForDiagnostics: "pattern",
kind: "Pattern",
children: [
- Child(name: "IsKeyword",
- kind: .token(choices: [.keyword(text: "is")])),
- Child(name: "Type",
- kind: .node(kind: "Type"))
+ Child(name: "Expression",
+ kind: .node(kind: "Expr"))
]),
Node(name: "IdentifierPattern",
@@ -41,31 +29,20 @@ public let PATTERN_NODES: [Node] = [
kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken")]))
]),
- Node(name: "TuplePattern",
- nameForDiagnostics: "tuple pattern",
+ Node(name: "IsTypePattern",
+ nameForDiagnostics: "'is' pattern",
kind: "Pattern",
- traits: [
- "Parenthesized"
- ],
children: [
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "Elements",
- kind: .collection(kind: "TuplePatternElementList", collectionElementName: "Element")),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
+ Child(name: "IsKeyword",
+ kind: .token(choices: [.keyword(text: "is")])),
+ Child(name: "Type",
+ kind: .node(kind: "Type"))
]),
- Node(name: "WildcardPattern",
- nameForDiagnostics: "wildcard pattern",
- kind: "Pattern",
- children: [
- Child(name: "Wildcard",
- kind: .token(choices: [.token(tokenKind: "WildcardToken")])),
- Child(name: "TypeAnnotation",
- kind: .node(kind: "TypeAnnotation"),
- isOptional: true)
- ]),
+ Node(name: "TuplePatternElementList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "TuplePatternElement"),
Node(name: "TuplePatternElement",
nameForDiagnostics: nil,
@@ -88,18 +65,30 @@ public let PATTERN_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "ExpressionPattern",
- nameForDiagnostics: "pattern",
+ Node(name: "TuplePattern",
+ nameForDiagnostics: "tuple pattern",
kind: "Pattern",
+ traits: [
+ "Parenthesized"
+ ],
children: [
- Child(name: "Expression",
- kind: .node(kind: "Expr"))
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
+ Child(name: "Elements",
+ kind: .collection(kind: "TuplePatternElementList", collectionElementName: "Element")),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
]),
- Node(name: "TuplePatternElementList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "TuplePatternElement"),
+ Node(name: "TypeAnnotation",
+ nameForDiagnostics: "type annotation",
+ kind: "Syntax",
+ children: [
+ Child(name: "Colon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "Type",
+ kind: .node(kind: "Type"))
+ ]),
Node(name: "ValueBindingPattern",
nameForDiagnostics: "value binding pattern",
@@ -111,4 +100,15 @@ public let PATTERN_NODES: [Node] = [
kind: .node(kind: "Pattern"))
]),
+ Node(name: "WildcardPattern",
+ nameForDiagnostics: "wildcard pattern",
+ kind: "Pattern",
+ children: [
+ Child(name: "Wildcard",
+ kind: .token(choices: [.token(tokenKind: "WildcardToken")])),
+ Child(name: "TypeAnnotation",
+ kind: .node(kind: "TypeAnnotation"),
+ isOptional: true)
+ ]),
+
]
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/StmtNodes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/StmtNodes.swift
index d3beb836c60..4836bc11c56 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/StmtNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/StmtNodes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,25 +13,108 @@
//===----------------------------------------------------------------------===//
public let STMT_NODES: [Node] = [
- Node(name: "LabeledStmt",
- nameForDiagnostics: "labeled statement",
+ Node(name: "AvailabilityCondition",
+ nameForDiagnostics: "availability condition",
+ kind: "Syntax",
+ children: [
+ Child(name: "AvailabilityKeyword",
+ kind: .token(choices: [.token(tokenKind: "PoundAvailableToken"), .token(tokenKind: "PoundUnavailableToken")])),
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
+ Child(name: "AvailabilitySpec",
+ kind: .collection(kind: "AvailabilitySpecList", collectionElementName: "AvailabilityArgument")),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
+ ]),
+
+ Node(name: "BreakStmt",
+ nameForDiagnostics: "'break' statement",
kind: "Stmt",
children: [
- Child(name: "LabelName",
+ Child(name: "BreakKeyword",
+ kind: .token(choices: [.keyword(text: "break")], requiresTrailingSpace: false)),
+ Child(name: "Label",
kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- nameForDiagnostics: "label name"),
- Child(name: "LabelColon",
- kind: .token(choices: [.token(tokenKind: "ColonToken")])),
- Child(name: "Statement",
- kind: .node(kind: "Stmt"))
+ nameForDiagnostics: "label",
+ isOptional: true)
]),
- Node(name: "ExpressionStmt",
- nameForDiagnostics: "expression",
- kind: "Stmt",
+ Node(name: "CaseItemList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "CaseItem"),
+
+ Node(name: "CatchClauseList",
+ nameForDiagnostics: "'catch' clause",
+ kind: "SyntaxCollection",
+ element: "CatchClause"),
+
+ Node(name: "CatchClause",
+ nameForDiagnostics: "'catch' clause",
+ kind: "Syntax",
+ traits: [
+ "WithCodeBlock"
+ ],
+ parserFunction: "parseCatchClause",
children: [
- Child(name: "Expression",
- kind: .node(kind: "Expr"))
+ Child(name: "CatchKeyword",
+ kind: .token(choices: [.keyword(text: "catch")])),
+ Child(name: "CatchItems",
+ kind: .collection(kind: "CatchItemList", collectionElementName: "CatchItem"),
+ isOptional: true),
+ Child(name: "Body",
+ kind: .node(kind: "CodeBlock"))
+ ]),
+
+ Node(name: "CatchItemList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "CatchItem"),
+
+ Node(name: "CatchItem",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
+ children: [
+ Child(name: "Pattern",
+ kind: .node(kind: "Pattern"),
+ isOptional: true),
+ Child(name: "WhereClause",
+ kind: .node(kind: "WhereClause"),
+ isOptional: true),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
+ ]),
+
+ Node(name: "ConditionElementList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "ConditionElement"),
+
+ Node(name: "ConditionElement",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
+ children: [
+ Child(name: "Condition",
+ kind: .nodeChoices(choices: [
+ Child(name: "Expression",
+ kind: .node(kind: "Expr")),
+ Child(name: "Availability",
+ kind: .node(kind: "AvailabilityCondition")),
+ Child(name: "MatchingPattern",
+ kind: .node(kind: "MatchingPatternCondition")),
+ Child(name: "OptionalBinding",
+ kind: .node(kind: "OptionalBindingCondition"))
+ ])),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
]),
Node(name: "ContinueStmt",
@@ -46,21 +129,6 @@ public let STMT_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "WhileStmt",
- nameForDiagnostics: "'while' statement",
- kind: "Stmt",
- traits: [
- "WithCodeBlock"
- ],
- children: [
- Child(name: "WhileKeyword",
- kind: .token(choices: [.keyword(text: "while")])),
- Child(name: "Conditions",
- kind: .collection(kind: "ConditionElementList", collectionElementName: "Condition")),
- Child(name: "Body",
- kind: .node(kind: "CodeBlock"))
- ]),
-
Node(name: "DeferStmt",
nameForDiagnostics: "'defer' statement",
kind: "Stmt",
@@ -74,52 +142,37 @@ public let STMT_NODES: [Node] = [
kind: .node(kind: "CodeBlock"))
]),
- Node(name: "RepeatWhileStmt",
- nameForDiagnostics: "'repeat' statement",
+ Node(name: "DoStmt",
+ nameForDiagnostics: "'do' statement",
kind: "Stmt",
traits: [
"WithCodeBlock"
],
children: [
- Child(name: "RepeatKeyword",
- kind: .token(choices: [.keyword(text: "repeat")])),
+ Child(name: "DoKeyword",
+ kind: .token(choices: [.keyword(text: "do")])),
Child(name: "Body",
kind: .node(kind: "CodeBlock"),
nameForDiagnostics: "body"),
- Child(name: "WhileKeyword",
- kind: .token(choices: [.keyword(text: "while")])),
- Child(name: "Condition",
- kind: .node(kind: "Expr"),
- nameForDiagnostics: "condition")
+ Child(name: "CatchClauses",
+ kind: .collection(kind: "CatchClauseList", collectionElementName: "CatchClause"),
+ isOptional: true)
]),
- Node(name: "GuardStmt",
- nameForDiagnostics: "'guard' statement",
+ Node(name: "ExpressionStmt",
+ nameForDiagnostics: "expression",
kind: "Stmt",
- traits: [
- "WithCodeBlock"
- ],
children: [
- Child(name: "GuardKeyword",
- kind: .token(choices: [.keyword(text: "guard")])),
- Child(name: "Conditions",
- kind: .collection(kind: "ConditionElementList", collectionElementName: "Condition"),
- nameForDiagnostics: "condition"),
- Child(name: "ElseKeyword",
- kind: .token(choices: [.keyword(text: "else")])),
- Child(name: "Body",
- kind: .node(kind: "CodeBlock"),
- nameForDiagnostics: "body")
+ Child(name: "Expression",
+ kind: .node(kind: "Expr"))
]),
- Node(name: "WhereClause",
- nameForDiagnostics: "'where' clause",
- kind: "Syntax",
+ Node(name: "FallthroughStmt",
+ nameForDiagnostics: "'fallthrough' statement",
+ kind: "Stmt",
children: [
- Child(name: "WhereKeyword",
- kind: .token(choices: [.keyword(text: "where")])),
- Child(name: "GuardResult",
- kind: .node(kind: "Expr"))
+ Child(name: "FallthroughKeyword",
+ kind: .token(choices: [.keyword(text: "fallthrough")]))
]),
Node(name: "ForInStmt",
@@ -158,131 +211,36 @@ public let STMT_NODES: [Node] = [
nameForDiagnostics: "body")
]),
- Node(name: "CatchClauseList",
- nameForDiagnostics: "'catch' clause",
- kind: "SyntaxCollection",
- element: "CatchClause"),
-
- Node(name: "DoStmt",
- nameForDiagnostics: "'do' statement",
+ Node(name: "GuardStmt",
+ nameForDiagnostics: "'guard' statement",
kind: "Stmt",
traits: [
"WithCodeBlock"
],
children: [
- Child(name: "DoKeyword",
- kind: .token(choices: [.keyword(text: "do")])),
+ Child(name: "GuardKeyword",
+ kind: .token(choices: [.keyword(text: "guard")])),
+ Child(name: "Conditions",
+ kind: .collection(kind: "ConditionElementList", collectionElementName: "Condition"),
+ nameForDiagnostics: "condition"),
+ Child(name: "ElseKeyword",
+ kind: .token(choices: [.keyword(text: "else")])),
Child(name: "Body",
kind: .node(kind: "CodeBlock"),
- nameForDiagnostics: "body"),
- Child(name: "CatchClauses",
- kind: .collection(kind: "CatchClauseList", collectionElementName: "CatchClause"),
- isOptional: true)
- ]),
-
- Node(name: "ReturnStmt",
- nameForDiagnostics: "'return' statement",
- kind: "Stmt",
- children: [
- Child(name: "ReturnKeyword",
- kind: .token(choices: [.keyword(text: "return")])),
- Child(name: "Expression",
- kind: .node(kind: "Expr"),
- isOptional: true)
- ]),
-
- Node(name: "YieldStmt",
- nameForDiagnostics: "'yield' statement",
- kind: "Stmt",
- children: [
- Child(name: "YieldKeyword",
- kind: .token(choices: [.keyword(text: "yield")])),
- Child(name: "Yields",
- kind: .nodeChoices(choices: [
- Child(name: "YieldList",
- kind: .node(kind: "YieldList")),
- Child(name: "SimpleYield",
- kind: .node(kind: "Expr"))
- ]))
- ]),
-
- Node(name: "YieldList",
- nameForDiagnostics: nil,
- kind: "Syntax",
- children: [
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "ElementList",
- kind: .collection(kind: "YieldExprList", collectionElementName: "Element")),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
- ]),
-
- Node(name: "FallthroughStmt",
- nameForDiagnostics: "'fallthrough' statement",
- kind: "Stmt",
- children: [
- Child(name: "FallthroughKeyword",
- kind: .token(choices: [.keyword(text: "fallthrough")]))
+ nameForDiagnostics: "body")
]),
- Node(name: "BreakStmt",
- nameForDiagnostics: "'break' statement",
+ Node(name: "LabeledStmt",
+ nameForDiagnostics: "labeled statement",
kind: "Stmt",
children: [
- Child(name: "BreakKeyword",
- kind: .token(choices: [.keyword(text: "break")], requiresTrailingSpace: false)),
- Child(name: "Label",
+ Child(name: "LabelName",
kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
- nameForDiagnostics: "label",
- isOptional: true)
- ]),
-
- Node(name: "CaseItemList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "CaseItem"),
-
- Node(name: "CatchItemList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "CatchItem"),
-
- Node(name: "ConditionElement",
- nameForDiagnostics: nil,
- kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
- children: [
- Child(name: "Condition",
- kind: .nodeChoices(choices: [
- Child(name: "Expression",
- kind: .node(kind: "Expr")),
- Child(name: "Availability",
- kind: .node(kind: "AvailabilityCondition")),
- Child(name: "MatchingPattern",
- kind: .node(kind: "MatchingPatternCondition")),
- Child(name: "OptionalBinding",
- kind: .node(kind: "OptionalBindingCondition"))
- ])),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
- ]),
-
- Node(name: "AvailabilityCondition",
- nameForDiagnostics: "availability condition",
- kind: "Syntax",
- children: [
- Child(name: "AvailabilityKeyword",
- kind: .token(choices: [.token(tokenKind: "PoundAvailableToken"), .token(tokenKind: "PoundUnavailableToken")])),
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "AvailabilitySpec",
- kind: .collection(kind: "AvailabilitySpecList", collectionElementName: "AvailabilityArgument")),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
+ nameForDiagnostics: "label name"),
+ Child(name: "LabelColon",
+ kind: .token(choices: [.token(tokenKind: "ColonToken")])),
+ Child(name: "Statement",
+ kind: .node(kind: "Stmt"))
]),
Node(name: "MatchingPatternCondition",
@@ -316,10 +274,35 @@ public let STMT_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "ConditionElementList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "ConditionElement"),
+ Node(name: "RepeatWhileStmt",
+ nameForDiagnostics: "'repeat' statement",
+ kind: "Stmt",
+ traits: [
+ "WithCodeBlock"
+ ],
+ children: [
+ Child(name: "RepeatKeyword",
+ kind: .token(choices: [.keyword(text: "repeat")])),
+ Child(name: "Body",
+ kind: .node(kind: "CodeBlock"),
+ nameForDiagnostics: "body"),
+ Child(name: "WhileKeyword",
+ kind: .token(choices: [.keyword(text: "while")])),
+ Child(name: "Condition",
+ kind: .node(kind: "Expr"),
+ nameForDiagnostics: "condition")
+ ]),
+
+ Node(name: "ReturnStmt",
+ nameForDiagnostics: "'return' statement",
+ kind: "Stmt",
+ children: [
+ Child(name: "ReturnKeyword",
+ kind: .token(choices: [.keyword(text: "return")])),
+ Child(name: "Expression",
+ kind: .node(kind: "Expr"),
+ isOptional: true)
+ ]),
Node(name: "ThrowStmt",
nameForDiagnostics: "'throw' statement",
@@ -331,39 +314,56 @@ public let STMT_NODES: [Node] = [
kind: .node(kind: "Expr"))
]),
- Node(name: "CatchItem",
- nameForDiagnostics: nil,
+ Node(name: "WhereClause",
+ nameForDiagnostics: "'where' clause",
kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
children: [
- Child(name: "Pattern",
- kind: .node(kind: "Pattern"),
- isOptional: true),
- Child(name: "WhereClause",
- kind: .node(kind: "WhereClause"),
- isOptional: true),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
+ Child(name: "WhereKeyword",
+ kind: .token(choices: [.keyword(text: "where")])),
+ Child(name: "GuardResult",
+ kind: .node(kind: "Expr"))
]),
- Node(name: "CatchClause",
- nameForDiagnostics: "'catch' clause",
- kind: "Syntax",
+ Node(name: "WhileStmt",
+ nameForDiagnostics: "'while' statement",
+ kind: "Stmt",
traits: [
"WithCodeBlock"
],
- parserFunction: "parseCatchClause",
children: [
- Child(name: "CatchKeyword",
- kind: .token(choices: [.keyword(text: "catch")])),
- Child(name: "CatchItems",
- kind: .collection(kind: "CatchItemList", collectionElementName: "CatchItem"),
- isOptional: true),
+ Child(name: "WhileKeyword",
+ kind: .token(choices: [.keyword(text: "while")])),
+ Child(name: "Conditions",
+ kind: .collection(kind: "ConditionElementList", collectionElementName: "Condition")),
Child(name: "Body",
kind: .node(kind: "CodeBlock"))
]),
+ Node(name: "YieldList",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
+ children: [
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
+ Child(name: "ElementList",
+ kind: .collection(kind: "YieldExprList", collectionElementName: "Element")),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
+ ]),
+
+ Node(name: "YieldStmt",
+ nameForDiagnostics: "'yield' statement",
+ kind: "Stmt",
+ children: [
+ Child(name: "YieldKeyword",
+ kind: .token(choices: [.keyword(text: "yield")])),
+ Child(name: "Yields",
+ kind: .nodeChoices(choices: [
+ Child(name: "YieldList",
+ kind: .node(kind: "YieldList")),
+ Child(name: "SimpleYield",
+ kind: .node(kind: "Expr"))
+ ]))
+ ]),
+
]
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/SyntaxBaseKinds.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/SyntaxBaseKinds.swift
index 4cbab2caef9..bf72deaccae 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/SyntaxBaseKinds.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/SyntaxBaseKinds.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/TokenSpec.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/TokenSpec.swift
index 3f46eee9fc0..033c35e19b9 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/TokenSpec.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/TokenSpec.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -169,52 +169,52 @@ public class LiteralSpec: TokenSpec { }
public class MiscSpec: TokenSpec { }
public let SYNTAX_TOKENS: [TokenSpec] = [
- MiscSpec(name: "Wildcard", kind: "_", nameForDiagnostics: "wildcard", text: "_"),
- PunctuatorSpec(name: "LeftParen", kind: "l_paren", text: "("),
- PunctuatorSpec(name: "RightParen", kind: "r_paren", text: ")"),
- PunctuatorSpec(name: "LeftBrace", kind: "l_brace", text: "{", requiresLeadingSpace: true),
- PunctuatorSpec(name: "RightBrace", kind: "r_brace", text: "}"),
- PunctuatorSpec(name: "LeftSquareBracket", kind: "l_square", text: "["),
- PunctuatorSpec(name: "RightSquareBracket", kind: "r_square", text: "]"),
- PunctuatorSpec(name: "LeftAngle", kind: "l_angle", text: "<"),
- PunctuatorSpec(name: "RightAngle", kind: "r_angle", text: ">"),
- PunctuatorSpec(name: "Period", kind: "period", text: "."),
+ PunctuatorSpec(name: "Arrow", kind: "arrow", text: "->", requiresLeadingSpace: true, requiresTrailingSpace: true),
+ PunctuatorSpec(name: "AtSign", kind: "at_sign", text: "@", classification: "Attribute"),
+ PunctuatorSpec(name: "Backslash", kind: "backslash", text: "\\"),
+ PunctuatorSpec(name: "Backtick", kind: "backtick", text: "`"),
+ MiscSpec(name: "BinaryOperator", kind: "oper_binary", nameForDiagnostics: "binary operator", classification: "OperatorIdentifier", requiresLeadingSpace: true, requiresTrailingSpace: true),
+ PunctuatorSpec(name: "Colon", kind: "colon", text: ":", requiresTrailingSpace: true),
PunctuatorSpec(name: "Comma", kind: "comma", text: ",", requiresTrailingSpace: true),
+ MiscSpec(name: "DollarIdentifier", kind: "dollarident", nameForDiagnostics: "dollar identifier", classification: "DollarIdentifier"),
PunctuatorSpec(name: "Ellipsis", kind: "ellipsis", text: "..."),
- PunctuatorSpec(name: "Colon", kind: "colon", text: ":", requiresTrailingSpace: true),
- PunctuatorSpec(name: "Semicolon", kind: "semi", text: ";"),
PunctuatorSpec(name: "Equal", kind: "equal", text: "=", requiresLeadingSpace: true, requiresTrailingSpace: true),
- PunctuatorSpec(name: "AtSign", kind: "at_sign", text: "@", classification: "Attribute"),
- PunctuatorSpec(name: "Pound", kind: "pound", text: "#"),
- PunctuatorSpec(name: "PrefixAmpersand", kind: "amp_prefix", text: "&"),
- PunctuatorSpec(name: "Arrow", kind: "arrow", text: "->", requiresLeadingSpace: true, requiresTrailingSpace: true),
- PunctuatorSpec(name: "Backtick", kind: "backtick", text: "`"),
- PunctuatorSpec(name: "Backslash", kind: "backslash", text: "\\"),
PunctuatorSpec(name: "ExclamationMark", kind: "exclaim_postfix", text: "!"),
- PunctuatorSpec(name: "PostfixQuestionMark", kind: "question_postfix", text: "?"),
+ LiteralSpec(name: "FloatingLiteral", kind: "floating_literal", nameForDiagnostics: "floating literal", classification: "FloatingLiteral"),
+ MiscSpec(name: "Identifier", kind: "identifier", nameForDiagnostics: "identifier", classification: "Identifier"),
PunctuatorSpec(name: "InfixQuestionMark", kind: "question_infix", text: "?"),
- PunctuatorSpec(name: "StringQuote", kind: "string_quote", text: "\"", classification: "StringLiteral"),
- PunctuatorSpec(name: "SingleQuote", kind: "single_quote", text: "\'", classification: "StringLiteral"),
+ LiteralSpec(name: "IntegerLiteral", kind: "integer_literal", nameForDiagnostics: "integer literal", classification: "IntegerLiteral"),
+ MiscSpec(name: "Keyword", kind: "keyword", nameForDiagnostics: "keyword", classification: "Keyword", associatedValueClass: "Keyword"),
+ PunctuatorSpec(name: "LeftAngle", kind: "l_angle", text: "<"),
+ PunctuatorSpec(name: "LeftBrace", kind: "l_brace", text: "{", requiresLeadingSpace: true),
+ PunctuatorSpec(name: "LeftParen", kind: "l_paren", text: "("),
+ PunctuatorSpec(name: "LeftSquareBracket", kind: "l_square", text: "["),
PunctuatorSpec(name: "MultilineStringQuote", kind: "multiline_string_quote", text: "\"\"\"", classification: "StringLiteral"),
- PoundDirectiveKeywordSpec(name: "PoundSourceLocation", kind: "pound_sourceLocation", text: "#sourceLocation"),
- PoundConditionalDirectiveKeywordSpec(name: "PoundIf", kind: "pound_if", text: "#if"),
+ PunctuatorSpec(name: "Period", kind: "period", text: "."),
+ MiscSpec(name: "PostfixOperator", kind: "oper_postfix", nameForDiagnostics: "postfix operator", classification: "OperatorIdentifier"),
+ PunctuatorSpec(name: "PostfixQuestionMark", kind: "question_postfix", text: "?"),
+ PunctuatorSpec(name: "Pound", kind: "pound", text: "#"),
+ PoundConfigSpec(name: "PoundAvailable", kind: "pound_available", text: "#available"),
PoundConditionalDirectiveKeywordSpec(name: "PoundElse", kind: "pound_else", text: "#else"),
PoundConditionalDirectiveKeywordSpec(name: "PoundElseif", kind: "pound_elseif", text: "#elseif"),
PoundConditionalDirectiveKeywordSpec(name: "PoundEndif", kind: "pound_endif", text: "#endif"),
- PoundConfigSpec(name: "PoundAvailable", kind: "pound_available", text: "#available"),
+ PoundConditionalDirectiveKeywordSpec(name: "PoundIf", kind: "pound_if", text: "#if"),
+ PoundDirectiveKeywordSpec(name: "PoundSourceLocation", kind: "pound_sourceLocation", text: "#sourceLocation"),
PoundConfigSpec(name: "PoundUnavailable", kind: "pound_unavailable", text: "#unavailable"),
- LiteralSpec(name: "IntegerLiteral", kind: "integer_literal", nameForDiagnostics: "integer literal", classification: "IntegerLiteral"),
- LiteralSpec(name: "FloatingLiteral", kind: "floating_literal", nameForDiagnostics: "floating literal", classification: "FloatingLiteral"),
- LiteralSpec(name: "RegexLiteral", kind: "regex_literal", nameForDiagnostics: "regex literal"),
- MiscSpec(name: "Unknown", kind: "unknown", nameForDiagnostics: "token"),
- MiscSpec(name: "Identifier", kind: "identifier", nameForDiagnostics: "identifier", classification: "Identifier"),
- MiscSpec(name: "BinaryOperator", kind: "oper_binary", nameForDiagnostics: "binary operator", classification: "OperatorIdentifier", requiresLeadingSpace: true, requiresTrailingSpace: true),
- MiscSpec(name: "PostfixOperator", kind: "oper_postfix", nameForDiagnostics: "postfix operator", classification: "OperatorIdentifier"),
+ PunctuatorSpec(name: "PrefixAmpersand", kind: "amp_prefix", text: "&"),
MiscSpec(name: "PrefixOperator", kind: "oper_prefix", nameForDiagnostics: "prefix operator", classification: "OperatorIdentifier"),
- MiscSpec(name: "DollarIdentifier", kind: "dollarident", nameForDiagnostics: "dollar identifier", classification: "DollarIdentifier"),
- MiscSpec(name: "Keyword", kind: "keyword", nameForDiagnostics: "keyword", classification: "Keyword", associatedValueClass: "Keyword"),
MiscSpec(name: "RawStringDelimiter", kind: "raw_string_delimiter", nameForDiagnostics: "raw string delimiter"),
+ LiteralSpec(name: "RegexLiteral", kind: "regex_literal", nameForDiagnostics: "regex literal"),
+ PunctuatorSpec(name: "RightAngle", kind: "r_angle", text: ">"),
+ PunctuatorSpec(name: "RightBrace", kind: "r_brace", text: "}"),
+ PunctuatorSpec(name: "RightParen", kind: "r_paren", text: ")"),
+ PunctuatorSpec(name: "RightSquareBracket", kind: "r_square", text: "]"),
+ PunctuatorSpec(name: "Semicolon", kind: "semi", text: ";"),
+ PunctuatorSpec(name: "SingleQuote", kind: "single_quote", text: "\'", classification: "StringLiteral"),
+ PunctuatorSpec(name: "StringQuote", kind: "string_quote", text: "\"", classification: "StringLiteral"),
MiscSpec(name: "StringSegment", kind: "string_segment", nameForDiagnostics: "string segment", classification: "StringLiteral"),
+ MiscSpec(name: "Unknown", kind: "unknown", nameForDiagnostics: "token"),
+ MiscSpec(name: "Wildcard", kind: "_", nameForDiagnostics: "wildcard", text: "_"),
]
public let SYNTAX_TOKEN_MAP = Dictionary(uniqueKeysWithValues: SYNTAX_TOKENS.map { ("\($0.name)Token", $0) })
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Traits.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Traits.swift
index 5b807768d3c..651902f33fd 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Traits.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Traits.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -30,33 +30,26 @@ public let TRAITS: [Trait] = [
Child(name: "Attributes", kind: .node(kind: "AttributeList"), isOptional: true),
]
),
- Trait(traitName: "DeclGroup",
- children: [
- Child(name: "Attributes", kind: .node(kind: "AttributeList"), isOptional: true),
- Child(name: "Modifiers", kind: .node(kind: "ModifierList"), isOptional: true),
- Child(name: "Members", kind: .node(kind: "MemberDeclBlock")),
- ]
- ),
Trait(traitName: "Braced",
children: [
Child(name: "LeftBrace", kind: .token(choices: [.token(tokenKind: "LeftBraceToken")])),
Child(name: "RightBrace", kind: .token(choices: [.token(tokenKind: "RightBraceToken")])),
]
),
- Trait(traitName: "IdentifiedDecl",
- children: [
- Child(name: "Identifier", kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
- ]
- ),
- Trait(traitName: "WithCodeBlock",
+ Trait(traitName: "DeclGroup",
children: [
- Child(name: "Body", kind: .node(kind: "CodeBlock")),
+ Child(name: "Attributes", kind: .node(kind: "AttributeList"), isOptional: true),
+ Child(name: "Modifiers", kind: .node(kind: "ModifierList"), isOptional: true),
+ Child(name: "Members", kind: .node(kind: "MemberDeclBlock")),
]
),
- Trait(traitName: "Parenthesized",
+ Trait(traitName: "EffectSpecifiers",
children: [
- Child(name: "LeftParen", kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "RightParen", kind: .token(choices: [.token(tokenKind: "RightParenToken")])),
+ Child(name: "UnexpectedBeforeAsyncSpecifier", kind: .node(kind: "UnexpectedNodes"), isOptional: true),
+ Child(name: "AsyncSpecifier", kind: .token(choices: [.token(tokenKind: "KeywordToken")]), isOptional: true),
+ Child(name: "UnexpectedBetweenAsyncSpecifierAndThrowsSpecifier", kind: .node(kind: "UnexpectedNodes"), isOptional: true),
+ Child(name: "ThrowsSpecifier", kind: .token(choices: [.token(tokenKind: "KeywordToken")]), isOptional: true),
+ Child(name: "UnexpectedAfterThrowsSpecifier", kind: .node(kind: "UnexpectedNodes"), isOptional: true),
]
),
Trait(traitName: "FreestandingMacroExpansion",
@@ -71,9 +64,20 @@ public let TRAITS: [Trait] = [
Child(name: "AdditionalTrailingClosures", kind: .node(kind: "MultipleTrailingClosureElementList"), isOptional: true),
]
),
- Trait(traitName: "WithTrailingComma",
+ Trait(traitName: "IdentifiedDecl",
children: [
- Child(name: "TrailingComma", kind: .token(choices: [.token(tokenKind: "CommaToken")]), isOptional: true),
+ Child(name: "Identifier", kind: .token(choices: [.token(tokenKind: "IdentifierToken")])),
+ ]
+ ),
+ Trait(traitName: "Parenthesized",
+ children: [
+ Child(name: "LeftParen", kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
+ Child(name: "RightParen", kind: .token(choices: [.token(tokenKind: "RightParenToken")])),
+ ]
+ ),
+ Trait(traitName: "WithCodeBlock",
+ children: [
+ Child(name: "Body", kind: .node(kind: "CodeBlock")),
]
),
Trait(traitName: "WithStatements",
@@ -81,13 +85,9 @@ public let TRAITS: [Trait] = [
Child(name: "Statements", kind: .node(kind: "CodeBlockItemList")),
]
),
- Trait(traitName: "EffectSpecifiers",
+ Trait(traitName: "WithTrailingComma",
children: [
- Child(name: "UnexpectedBeforeAsyncSpecifier", kind: .node(kind: "UnexpectedNodes"), isOptional: true),
- Child(name: "AsyncSpecifier", kind: .token(choices: [.token(tokenKind: "KeywordToken")]), isOptional: true),
- Child(name: "UnexpectedBetweenAsyncSpecifierAndThrowsSpecifier", kind: .node(kind: "UnexpectedNodes"), isOptional: true),
- Child(name: "ThrowsSpecifier", kind: .token(choices: [.token(tokenKind: "KeywordToken")]), isOptional: true),
- Child(name: "UnexpectedAfterThrowsSpecifier", kind: .node(kind: "UnexpectedNodes"), isOptional: true),
+ Child(name: "TrailingComma", kind: .token(choices: [.token(tokenKind: "CommaToken")]), isOptional: true),
]
),
]
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Trivia.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Trivia.swift
index 425e15a5d93..f24941fcda5 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Trivia.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/Trivia.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -61,47 +61,17 @@ public class Trivia {
}
public let TRIVIAS: [Trivia] = [
- Trivia(name: "Space",
- comment: #"A space ' ' character."#,
- characters: [
- Character(" ")
- ],
- swiftCharacters: [
- Character(" ")
- ]),
- Trivia(name: "Tab",
- comment: #"A tab '\t' character."#,
- characters: [
- Character("\t")
- ],
- swiftCharacters: [
- Character("\t")
- ]),
- Trivia(name: "VerticalTab",
- comment: #"A vertical tab '\v' character."#,
- characters: [
- Character("\u{b}")
- ],
- swiftCharacters: [
- Character("\u{2B7F}")
- ]),
- Trivia(name: "Formfeed",
- comment: #"A form-feed 'f' character."#,
+ Trivia(name: "Backslash",
+ comment: #"A backslash that is at the end of a line in a multi-line string literal to escape the newline."#,
characters: [
- Character("\u{c}")
+ Character("\\")
],
swiftCharacters: [
- Character("\u{240C}")
+ Character("\\")
]),
- Trivia(name: "Newline",
- comment: #"A newline '\n' character."#,
- characters: [
- Character("\n")
- ],
- swiftCharacters: [
- Character("\n")
- ],
- isNewLine: true),
+ Trivia(name: "BlockComment",
+ comment: #"A developer block comment, starting with '/*' and ending with '*/'."#,
+ isComment: true),
Trivia(name: "CarriageReturn",
comment: #"A newline '\r' character."#,
characters: [
@@ -122,26 +92,32 @@ public let TRIVIAS: [Trivia] = [
Character("\n")
],
isNewLine: true),
- Trivia(name: "LineComment",
- comment: #"A developer line comment, starting with '//'"#,
- isComment: true),
- Trivia(name: "BlockComment",
- comment: #"A developer block comment, starting with '/*' and ending with '*/'."#,
+ Trivia(name: "DocBlockComment",
+ comment: #"A documentation block comment, starting with '/**' and ending with '*/'."#,
isComment: true),
Trivia(name: "DocLineComment",
comment: #"A documentation line comment, starting with '///'."#,
isComment: true),
- Trivia(name: "DocBlockComment",
- comment: #"A documentation block comment, starting with '/**' and ending with '*/'."#,
- isComment: true),
- Trivia(name: "Backslash",
- comment: #"A backslash that is at the end of a line in a multi-line string literal to escape the newline."#,
+ Trivia(name: "Formfeed",
+ comment: #"A form-feed 'f' character."#,
characters: [
- Character("\\")
+ Character("\u{c}")
],
swiftCharacters: [
- Character("\\")
+ Character("\u{240C}")
]),
+ Trivia(name: "LineComment",
+ comment: #"A developer line comment, starting with '//'"#,
+ isComment: true),
+ Trivia(name: "Newline",
+ comment: #"A newline '\n' character."#,
+ characters: [
+ Character("\n")
+ ],
+ swiftCharacters: [
+ Character("\n")
+ ],
+ isNewLine: true),
Trivia(name: "Pound",
comment: #"A '#' that is at the end of a line in a multi-line string literal to escape the newline."#,
characters: [
@@ -150,8 +126,32 @@ public let TRIVIAS: [Trivia] = [
swiftCharacters: [
Character("#")
]),
- Trivia(name: "UnexpectedText",
- comment: #"Any skipped unexpected text."#),
Trivia(name: "Shebang",
comment: #"A script command, starting with '#!'."#),
+ Trivia(name: "Space",
+ comment: #"A space ' ' character."#,
+ characters: [
+ Character(" ")
+ ],
+ swiftCharacters: [
+ Character(" ")
+ ]),
+ Trivia(name: "Tab",
+ comment: #"A tab '\t' character."#,
+ characters: [
+ Character("\t")
+ ],
+ swiftCharacters: [
+ Character("\t")
+ ]),
+ Trivia(name: "UnexpectedText",
+ comment: #"Any skipped unexpected text."#),
+ Trivia(name: "VerticalTab",
+ comment: #"A vertical tab '\v' character."#,
+ characters: [
+ Character("\u{b}")
+ ],
+ swiftCharacters: [
+ Character("\u{2B7F}")
+ ]),
]
diff --git a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/TypeNodes.swift b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/TypeNodes.swift
index 75cf05616f6..c76ad62ce9f 100644
--- a/CodeGeneration/Sources/SyntaxSupport/gyb_generated/TypeNodes.swift
+++ b/CodeGeneration/Sources/SyntaxSupport/gyb_generated/TypeNodes.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,34 +13,33 @@
//===----------------------------------------------------------------------===//
public let TYPE_NODES: [Node] = [
- Node(name: "SimpleTypeIdentifier",
- nameForDiagnostics: "type",
+ Node(name: "ArrayType",
+ nameForDiagnostics: "array type",
kind: "Type",
children: [
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken"), .token(tokenKind: "WildcardToken")]),
- classification: "TypeIdentifier"),
- Child(name: "GenericArgumentClause",
- kind: .node(kind: "GenericArgumentClause"),
- isOptional: true)
+ Child(name: "LeftSquareBracket",
+ kind: .token(choices: [.token(tokenKind: "LeftSquareBracketToken")])),
+ Child(name: "ElementType",
+ kind: .node(kind: "Type")),
+ Child(name: "RightSquareBracket",
+ kind: .token(choices: [.token(tokenKind: "RightSquareBracketToken")]))
]),
- Node(name: "MemberTypeIdentifier",
- nameForDiagnostics: "member type",
+ Node(name: "AttributedType",
+ nameForDiagnostics: "type",
kind: "Type",
+ traits: [
+ "Attributed"
+ ],
children: [
+ Child(name: "Specifier",
+ kind: .token(choices: [.keyword(text: "inout"), .keyword(text: "__shared"), .keyword(text: "__owned"), .keyword(text: "isolated"), .keyword(text: "_const")]),
+ isOptional: true),
+ Child(name: "Attributes",
+ kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
+ isOptional: true),
Child(name: "BaseType",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "base type"),
- Child(name: "Period",
- kind: .token(choices: [.token(tokenKind: "PeriodToken")])),
- Child(name: "Name",
- kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken")]),
- nameForDiagnostics: "name",
- classification: "TypeIdentifier"),
- Child(name: "GenericArgumentClause",
- kind: .node(kind: "GenericArgumentClause"),
- isOptional: true)
+ kind: .node(kind: "Type"))
]),
Node(name: "ClassRestrictionType",
@@ -51,16 +50,38 @@ public let TYPE_NODES: [Node] = [
kind: .token(choices: [.keyword(text: "class")]))
]),
- Node(name: "ArrayType",
- nameForDiagnostics: "array type",
- kind: "Type",
+ Node(name: "CompositionTypeElementList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "CompositionTypeElement"),
+
+ Node(name: "CompositionTypeElement",
+ nameForDiagnostics: nil,
+ kind: "Syntax",
children: [
- Child(name: "LeftSquareBracket",
- kind: .token(choices: [.token(tokenKind: "LeftSquareBracketToken")])),
- Child(name: "ElementType",
+ Child(name: "Type",
kind: .node(kind: "Type")),
- Child(name: "RightSquareBracket",
- kind: .token(choices: [.token(tokenKind: "RightSquareBracketToken")]))
+ Child(name: "Ampersand",
+ kind: .node(kind: "Token"),
+ isOptional: true)
+ ]),
+
+ Node(name: "CompositionType",
+ nameForDiagnostics: "type composition",
+ kind: "Type",
+ children: [
+ Child(name: "Elements",
+ kind: .collection(kind: "CompositionTypeElementList", collectionElementName: "Element"))
+ ]),
+
+ Node(name: "ConstrainedSugarType",
+ nameForDiagnostics: "type",
+ kind: "Type",
+ children: [
+ Child(name: "SomeOrAnySpecifier",
+ kind: .token(choices: [.keyword(text: "some"), .keyword(text: "any")])),
+ Child(name: "BaseType",
+ kind: .node(kind: "Type"))
]),
Node(name: "DictionaryType",
@@ -81,37 +102,56 @@ public let TYPE_NODES: [Node] = [
kind: .token(choices: [.token(tokenKind: "RightSquareBracketToken")]))
]),
- Node(name: "MetatypeType",
- nameForDiagnostics: "metatype",
+ Node(name: "FunctionType",
+ nameForDiagnostics: "function type",
kind: "Type",
+ traits: [
+ "Parenthesized"
+ ],
children: [
- Child(name: "BaseType",
- kind: .node(kind: "Type"),
- nameForDiagnostics: "base type"),
- Child(name: "Period",
- kind: .token(choices: [.token(tokenKind: "PeriodToken")])),
- Child(name: "TypeOrProtocol",
- kind: .token(choices: [.keyword(text: "Type"), .keyword(text: "Protocol")]))
+ Child(name: "LeftParen",
+ kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
+ Child(name: "Arguments",
+ kind: .collection(kind: "TupleTypeElementList", collectionElementName: "Argument"),
+ isIndented: true),
+ Child(name: "RightParen",
+ kind: .token(choices: [.token(tokenKind: "RightParenToken")])),
+ Child(name: "EffectSpecifiers",
+ kind: .node(kind: "TypeEffectSpecifiers"),
+ isOptional: true),
+ Child(name: "Output",
+ kind: .node(kind: "ReturnClause"))
]),
- Node(name: "OptionalType",
- nameForDiagnostics: "optional type",
- kind: "Type",
+ Node(name: "GenericArgumentClause",
+ nameForDiagnostics: "generic argument clause",
+ kind: "Syntax",
children: [
- Child(name: "WrappedType",
- kind: .node(kind: "Type")),
- Child(name: "QuestionMark",
- kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken")]))
+ Child(name: "LeftAngleBracket",
+ kind: .token(choices: [.token(tokenKind: "LeftAngleToken")])),
+ Child(name: "Arguments",
+ kind: .collection(kind: "GenericArgumentList", collectionElementName: "Argument")),
+ Child(name: "RightAngleBracket",
+ kind: .token(choices: [.token(tokenKind: "RightAngleToken")]))
]),
- Node(name: "ConstrainedSugarType",
- nameForDiagnostics: "type",
- kind: "Type",
+ Node(name: "GenericArgumentList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "GenericArgument"),
+
+ Node(name: "GenericArgument",
+ nameForDiagnostics: "generic argument",
+ kind: "Syntax",
+ traits: [
+ "WithTrailingComma"
+ ],
children: [
- Child(name: "SomeOrAnySpecifier",
- kind: .token(choices: [.keyword(text: "some"), .keyword(text: "any")])),
- Child(name: "BaseType",
- kind: .node(kind: "Type"))
+ Child(name: "ArgumentType",
+ kind: .node(kind: "Type")),
+ Child(name: "TrailingComma",
+ kind: .token(choices: [.token(tokenKind: "CommaToken")]),
+ isOptional: true)
]),
Node(name: "ImplicitlyUnwrappedOptionalType",
@@ -124,28 +164,55 @@ public let TYPE_NODES: [Node] = [
kind: .token(choices: [.token(tokenKind: "ExclamationMarkToken")]))
]),
- Node(name: "CompositionTypeElement",
- nameForDiagnostics: nil,
- kind: "Syntax",
+ Node(name: "MemberTypeIdentifier",
+ nameForDiagnostics: "member type",
+ kind: "Type",
children: [
- Child(name: "Type",
- kind: .node(kind: "Type")),
- Child(name: "Ampersand",
- kind: .node(kind: "Token"),
+ Child(name: "BaseType",
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "base type"),
+ Child(name: "Period",
+ kind: .token(choices: [.token(tokenKind: "PeriodToken")])),
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken")]),
+ nameForDiagnostics: "name",
+ classification: "TypeIdentifier"),
+ Child(name: "GenericArgumentClause",
+ kind: .node(kind: "GenericArgumentClause"),
isOptional: true)
]),
- Node(name: "CompositionTypeElementList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "CompositionTypeElement"),
+ Node(name: "MetatypeType",
+ nameForDiagnostics: "metatype",
+ kind: "Type",
+ children: [
+ Child(name: "BaseType",
+ kind: .node(kind: "Type"),
+ nameForDiagnostics: "base type"),
+ Child(name: "Period",
+ kind: .token(choices: [.token(tokenKind: "PeriodToken")])),
+ Child(name: "TypeOrProtocol",
+ kind: .token(choices: [.keyword(text: "Type"), .keyword(text: "Protocol")]))
+ ]),
- Node(name: "CompositionType",
- nameForDiagnostics: "type composition",
+ Node(name: "NamedOpaqueReturnType",
+ nameForDiagnostics: "named opaque return type",
kind: "Type",
children: [
- Child(name: "Elements",
- kind: .collection(kind: "CompositionTypeElementList", collectionElementName: "Element"))
+ Child(name: "GenericParameters",
+ kind: .node(kind: "GenericParameterClause")),
+ Child(name: "BaseType",
+ kind: .node(kind: "Type"))
+ ]),
+
+ Node(name: "OptionalType",
+ nameForDiagnostics: "optional type",
+ kind: "Type",
+ children: [
+ Child(name: "WrappedType",
+ kind: .node(kind: "Type")),
+ Child(name: "QuestionMark",
+ kind: .token(choices: [.token(tokenKind: "PostfixQuestionMarkToken")]))
]),
Node(name: "PackExpansionType",
@@ -168,6 +235,23 @@ public let TYPE_NODES: [Node] = [
kind: .node(kind: "Type"))
]),
+ Node(name: "SimpleTypeIdentifier",
+ nameForDiagnostics: "type",
+ kind: "Type",
+ children: [
+ Child(name: "Name",
+ kind: .token(choices: [.token(tokenKind: "IdentifierToken"), .token(tokenKind: "KeywordToken"), .token(tokenKind: "WildcardToken")]),
+ classification: "TypeIdentifier"),
+ Child(name: "GenericArgumentClause",
+ kind: .node(kind: "GenericArgumentClause"),
+ isOptional: true)
+ ]),
+
+ Node(name: "TupleTypeElementList",
+ nameForDiagnostics: nil,
+ kind: "SyntaxCollection",
+ element: "TupleTypeElement"),
+
Node(name: "TupleTypeElement",
nameForDiagnostics: nil,
kind: "Syntax",
@@ -202,11 +286,6 @@ public let TYPE_NODES: [Node] = [
isOptional: true)
]),
- Node(name: "TupleTypeElementList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "TupleTypeElement"),
-
Node(name: "TupleType",
nameForDiagnostics: "tuple type",
kind: "Type",
@@ -223,83 +302,4 @@ public let TYPE_NODES: [Node] = [
kind: .token(choices: [.token(tokenKind: "RightParenToken")]))
]),
- Node(name: "FunctionType",
- nameForDiagnostics: "function type",
- kind: "Type",
- traits: [
- "Parenthesized"
- ],
- children: [
- Child(name: "LeftParen",
- kind: .token(choices: [.token(tokenKind: "LeftParenToken")])),
- Child(name: "Arguments",
- kind: .collection(kind: "TupleTypeElementList", collectionElementName: "Argument"),
- isIndented: true),
- Child(name: "RightParen",
- kind: .token(choices: [.token(tokenKind: "RightParenToken")])),
- Child(name: "EffectSpecifiers",
- kind: .node(kind: "TypeEffectSpecifiers"),
- isOptional: true),
- Child(name: "Output",
- kind: .node(kind: "ReturnClause"))
- ]),
-
- Node(name: "AttributedType",
- nameForDiagnostics: "type",
- kind: "Type",
- traits: [
- "Attributed"
- ],
- children: [
- Child(name: "Specifier",
- kind: .token(choices: [.keyword(text: "inout"), .keyword(text: "__shared"), .keyword(text: "__owned"), .keyword(text: "isolated"), .keyword(text: "_const")]),
- isOptional: true),
- Child(name: "Attributes",
- kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
- isOptional: true),
- Child(name: "BaseType",
- kind: .node(kind: "Type"))
- ]),
-
- Node(name: "GenericArgumentList",
- nameForDiagnostics: nil,
- kind: "SyntaxCollection",
- element: "GenericArgument"),
-
- Node(name: "GenericArgument",
- nameForDiagnostics: "generic argument",
- kind: "Syntax",
- traits: [
- "WithTrailingComma"
- ],
- children: [
- Child(name: "ArgumentType",
- kind: .node(kind: "Type")),
- Child(name: "TrailingComma",
- kind: .token(choices: [.token(tokenKind: "CommaToken")]),
- isOptional: true)
- ]),
-
- Node(name: "GenericArgumentClause",
- nameForDiagnostics: "generic argument clause",
- kind: "Syntax",
- children: [
- Child(name: "LeftAngleBracket",
- kind: .token(choices: [.token(tokenKind: "LeftAngleToken")])),
- Child(name: "Arguments",
- kind: .collection(kind: "GenericArgumentList", collectionElementName: "Argument")),
- Child(name: "RightAngleBracket",
- kind: .token(choices: [.token(tokenKind: "RightAngleToken")]))
- ]),
-
- Node(name: "NamedOpaqueReturnType",
- nameForDiagnostics: "named opaque return type",
- kind: "Type",
- children: [
- Child(name: "GenericParameters",
- kind: .node(kind: "GenericParameterClause")),
- Child(name: "BaseType",
- kind: .node(kind: "Type"))
- ]),
-
]
diff --git a/CodeGeneration/Sources/Utils/CodeGenerationFormat.swift b/CodeGeneration/Sources/Utils/CodeGenerationFormat.swift
index 30fb223e9b4..2bd1debc1de 100644
--- a/CodeGeneration/Sources/Utils/CodeGenerationFormat.swift
+++ b/CodeGeneration/Sources/Utils/CodeGenerationFormat.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/Utils/CopyrightHeader.swift b/CodeGeneration/Sources/Utils/CopyrightHeader.swift
index 23e4dc70e40..ba6e314f617 100644
--- a/CodeGeneration/Sources/Utils/CopyrightHeader.swift
+++ b/CodeGeneration/Sources/Utils/CopyrightHeader.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -10,7 +10,9 @@
//
//===----------------------------------------------------------------------===//
-public func generateCopyrightHeader(for generator: String) -> String {
+import SwiftSyntax
+
+public func generateCopyrightHeader(for generator: String) -> Trivia {
return """
//// Automatically Generated by \(generator)
//// Do Not Edit Directly!
@@ -18,14 +20,12 @@ public func generateCopyrightHeader(for generator: String) -> String {
//
// This source file is part of the Swift.org open source project
//
- // Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+ // Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
-
-
- """
+ """ + .newlines(2)
}
diff --git a/CodeGeneration/Sources/Utils/String+Extensions.swift b/CodeGeneration/Sources/Utils/String+Extensions.swift
index b14057506ca..a27b2276db2 100644
--- a/CodeGeneration/Sources/Utils/String+Extensions.swift
+++ b/CodeGeneration/Sources/Utils/String+Extensions.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/Utils/SyntaxBuildableChild.swift b/CodeGeneration/Sources/Utils/SyntaxBuildableChild.swift
index e746c4a8ca6..a6e8f008beb 100644
--- a/CodeGeneration/Sources/Utils/SyntaxBuildableChild.swift
+++ b/CodeGeneration/Sources/Utils/SyntaxBuildableChild.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/Utils/SyntaxBuildableNode.swift b/CodeGeneration/Sources/Utils/SyntaxBuildableNode.swift
index 1911fc3a476..8db916820ad 100644
--- a/CodeGeneration/Sources/Utils/SyntaxBuildableNode.swift
+++ b/CodeGeneration/Sources/Utils/SyntaxBuildableNode.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/Utils/SyntaxBuildableType.swift b/CodeGeneration/Sources/Utils/SyntaxBuildableType.swift
index bcefa19a1cc..8480e98a70a 100644
--- a/CodeGeneration/Sources/Utils/SyntaxBuildableType.swift
+++ b/CodeGeneration/Sources/Utils/SyntaxBuildableType.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/Utils/Utils.swift b/CodeGeneration/Sources/Utils/Utils.swift
index 24950b8a3d1..054aff44d70 100644
--- a/CodeGeneration/Sources/Utils/Utils.swift
+++ b/CodeGeneration/Sources/Utils/Utils.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/GenerateSwiftSyntax.swift b/CodeGeneration/Sources/generate-swiftsyntax/GenerateSwiftSyntax.swift
index 9e73350b87d..6508ed84cce 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/GenerateSwiftSyntax.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/GenerateSwiftSyntax.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/basicformat/BasicFormatFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/basicformat/BasicFormatFile.swift
index 719ab8f5d7e..c5f3a76239f 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/basicformat/BasicFormatFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/basicformat/BasicFormatFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -49,13 +49,8 @@ extension Child {
}
}
-let basicFormatFile = SourceFileSyntax {
- DeclSyntax(
- """
- \(raw: generateCopyrightHeader(for: "generate-swiftbasicformat"))
- import SwiftSyntax
- """
- )
+let basicFormatFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftbasicformat")) {
+ DeclSyntax("import SwiftSyntax")
try! ClassDeclSyntax("open class BasicFormat: SyntaxRewriter") {
DeclSyntax("public var indentationLevel: Int = 0")
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/ideutils/SyntaxClassificationFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/ideutils/SyntaxClassificationFile.swift
index c46a3700ed1..b2c28e2b382 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/ideutils/SyntaxClassificationFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/ideutils/SyntaxClassificationFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -29,13 +29,8 @@ fileprivate var node_child_classifications: [ChildClassification] {
return result
}
-let syntaxClassificationFile = SourceFileSyntax {
- DeclSyntax(
- """
- \(raw: generateCopyrightHeader(for: "generate-ideutils"))
- @_spi(RawSyntax) import SwiftSyntax
- """
- )
+let syntaxClassificationFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-ideutils")) {
+ DeclSyntax("@_spi(RawSyntax) import SwiftSyntax")
try! EnumDeclSyntax("public enum SyntaxClassification") {
for classification in SYNTAX_CLASSIFICATIONS {
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/DeclarationModifierFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/DeclarationModifierFile.swift
index 873ad6799b4..641a1e0ef1e 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/DeclarationModifierFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/DeclarationModifierFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,14 +15,8 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let declarationModifierFile = SourceFileSyntax {
- DeclSyntax(
- """
- \(raw: generateCopyrightHeader(for: "generate-swiftparser"))
- @_spi(RawSyntax) import SwiftSyntax
-
- """
- )
+let declarationModifierFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftparser")) {
+ DeclSyntax("@_spi(RawSyntax) import SwiftSyntax")
try! EnumDeclSyntax("enum DeclarationModifier: TokenSpecSet") {
for attribute in DECL_MODIFIER_KINDS {
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/ParserEntryFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/ParserEntryFile.swift
index 940b475d284..0011342c9ce 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/ParserEntryFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/ParserEntryFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,14 +15,8 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let parserEntryFile = SourceFileSyntax {
- DeclSyntax(
- """
- \(raw: generateCopyrightHeader(for: "generate-swiftparser"))
- @_spi(RawSyntax) import SwiftSyntax
-
- """
- )
+let parserEntryFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftparser")) {
+ DeclSyntax("@_spi(RawSyntax) import SwiftSyntax")
try! ExtensionDeclSyntax("extension Parser") {
DeclSyntax(
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/TokenSpecStaticMembersFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/TokenSpecStaticMembersFile.swift
index 9003f5e1ea1..576592aaf78 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/TokenSpecStaticMembersFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/TokenSpecStaticMembersFile.swift
@@ -15,9 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let tokenSpecStaticMembersFile = SourceFileSyntax(
- leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftparser"))
-) {
+let tokenSpecStaticMembersFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftparser")) {
DeclSyntax("import SwiftSyntax")
try! ExtensionDeclSyntax("extension TokenSpec") {
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/TypeAttributeFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/TypeAttributeFile.swift
index 02bd0eb2949..e9ac0563327 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/TypeAttributeFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/TypeAttributeFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,14 +15,8 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let typeAttributeFile = SourceFileSyntax {
- DeclSyntax(
- """
- \(raw: generateCopyrightHeader(for: "generate-swiftparser"))
- @_spi(RawSyntax) import SwiftSyntax
-
- """
- )
+let typeAttributeFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftparser")) {
+ DeclSyntax("@_spi(RawSyntax) import SwiftSyntax")
try! ExtensionDeclSyntax("extension Parser") {
try EnumDeclSyntax("enum TypeAttribute: TokenSpecSet") {
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/KeywordFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/KeywordFile.swift
index a5fa1a2c26b..4652ac0e750 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/KeywordFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/KeywordFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -21,11 +21,9 @@ let lookupTable = ArrayExprSyntax(leftSquare: .leftSquareBracketToken(trailingTr
}
}
-let keywordFile = SourceFileSyntax {
+let keywordFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
DeclSyntax(
"""
- \(raw: generateCopyrightHeader(for: "generate-swiftparser"))
-
/// Make `StaticString` equatable so we can use it as the raw value for Keyword.
extension StaticString: Equatable {
public static func == (lhs: StaticString, rhs: StaticString) -> Bool {
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/MiscFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/MiscFile.swift
index 82aaf56fb81..ffb3b082378 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/MiscFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/MiscFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,13 +15,8 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let miscFile = SourceFileSyntax {
- try! ExtensionDeclSyntax(
- """
- \(raw: generateCopyrightHeader(for: "generate-swiftsyntax"))
- extension Syntax
- """
- ) {
+let miscFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
+ try! ExtensionDeclSyntax("extension Syntax") {
try VariableDeclSyntax("public static var structure: SyntaxNodeStructure") {
let choices = ArrayExprSyntax {
ArrayElementSyntax(
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/RawSyntaxNodesFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/RawSyntaxNodesFile.swift
index 7defdc6c345..50b93becca6 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/RawSyntaxNodesFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/RawSyntaxNodesFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let rawSyntaxNodesFile = SourceFileSyntax(leadingTrivia: "\(generateCopyrightHeader(for: "generate-swiftsyntax"))" + .newline) {
+let rawSyntaxNodesFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
for node in SYNTAX_NODES where node.isBase {
DeclSyntax(
"""
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxAnyVisitorFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxAnyVisitorFile.swift
index 05c545d6d6d..b9b83e17ea3 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxAnyVisitorFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxAnyVisitorFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,11 +15,9 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let syntaxAnyVisitorFile = SourceFileSyntax {
+let syntaxAnyVisitorFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
try! ClassDeclSyntax(
"""
- \(raw: generateCopyrightHeader(for: "generate-swiftsyntax"))
-
/// A `SyntaxVisitor` that can visit the nodes as generic `Syntax` values.
///
/// This subclass of `SyntaxVisitor` is slower than the type-specific visitation
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift
index 1b1c039599c..1139610f1bf 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let syntaxBaseNodesFile = SourceFileSyntax(leadingTrivia: [.blockComment(generateCopyrightHeader(for: "generate-swiftsyntax"))]) {
+let syntaxBaseNodesFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
for node in SYNTAX_NODES where node.isBase {
DeclSyntax(
"""
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxCollectionsFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxCollectionsFile.swift
index 5e7ffa7cb86..bd6b2c6d5cf 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxCollectionsFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxCollectionsFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let syntaxCollectionsFile = SourceFileSyntax(leadingTrivia: [.blockComment(generateCopyrightHeader(for: "generate-swiftsyntax"))]) {
+let syntaxCollectionsFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
DeclSyntax(
"""
public protocol SyntaxCollection: SyntaxProtocol, Sequence where Element: SyntaxProtocol {
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxEnumFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxEnumFile.swift
index ffe2342e4a5..f31edaf72c6 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxEnumFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxEnumFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let syntaxEnumFile = SourceFileSyntax(leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntax"))) {
+let syntaxEnumFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
try! EnumDeclSyntax(
"""
/// Enum to exhaustively switch over all different syntax nodes.
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxKindFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxKindFile.swift
index 7829740a20c..e58cff8bc5a 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxKindFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxKindFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let syntaxKindFile = SourceFileSyntax(leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntax"))) {
+let syntaxKindFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
try! EnumDeclSyntax(
"""
/// Enumerates the known kinds of Syntax represented in the Syntax tree.
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodeFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodeFile.swift
index 395c16d7061..7ae90c55bad 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodeFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodeFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -20,7 +20,7 @@ import Utils
/// variable `emitKind` set to a base kind listed in
/// It then only emits those syntax nodes whose base kind are that specified kind.
func syntaxNode(emitKind: String) -> SourceFileSyntax {
- SourceFileSyntax(leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntax"))) {
+ SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
for node in SYNTAX_NODES where !node.isBase && node.collectionElement.isEmpty && node.baseKind == emitKind {
// We are actually handling this node now
let nodeDoc = node.description.map { "/// \($0)" }
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxRewriterFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxRewriterFile.swift
index f04840e721d..b7acc5f3a07 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxRewriterFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxRewriterFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let syntaxRewriterFile = SourceFileSyntax(leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntax"))) {
+let syntaxRewriterFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
try! ClassDeclSyntax(
"""
//
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxTraitsFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxTraitsFile.swift
index 477d3763128..140d9cdd5a0 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxTraitsFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxTraitsFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let syntaxTraitsFile = SourceFileSyntax {
+let syntaxTraitsFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
for trait in TRAITS {
try! ProtocolDeclSyntax(
"""
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxTransformFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxTransformFile.swift
index 8596f3e88a1..ea4259d27e6 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxTransformFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxTransformFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let syntaxTransformFile = SourceFileSyntax(leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntax"))) {
+let syntaxTransformFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
try! ProtocolDeclSyntax("public protocol SyntaxTransformVisitor") {
DeclSyntax("associatedtype ResultType = Void")
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift
index cb3b94aa283..f85b1f375ff 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let syntaxVisitorFile = SourceFileSyntax {
+let syntaxVisitorFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
DeclSyntax(
"""
/// The enum describes how the SyntaxVistor should continue after visiting
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokenKindFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokenKindFile.swift
index 276e279aa41..db4c793ced1 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokenKindFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokenKindFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let tokenKindFile = SourceFileSyntax {
+let tokenKindFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
try! EnumDeclSyntax(
"""
/// Enumerates the kinds of tokens in the Swift language.
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokensFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokensFile.swift
index 0cc3e54b6f0..e4ab733d58f 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokensFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokensFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,9 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let tokensFile = SourceFileSyntax(
- leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntax"))
-) {
+let tokensFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
try! ExtensionDeclSyntax("extension TokenSyntax") {
for token in SYNTAX_TOKENS {
if token.isKeyword {
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TriviaFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TriviaFile.swift
index 1b190b2f1e4..fb245e2829d 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TriviaFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TriviaFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let triviaFile = SourceFileSyntax(leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntax"))) {
+let triviaFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntax")) {
DeclSyntax(
"""
public enum TriviaPosition {
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableCollectionNodesFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableCollectionNodesFile.swift
index bb37f570afc..ddf75048b2e 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableCollectionNodesFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableCollectionNodesFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -16,11 +16,8 @@ import SyntaxSupport
import Utils
import SwiftBasicFormat
-let buildableCollectionNodesFile = SourceFileSyntax {
- ImportDeclSyntax(
- leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntaxbuilder")),
- path: [AccessPathComponentSyntax(name: "SwiftSyntax")]
- )
+let buildableCollectionNodesFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntaxbuilder")) {
+ DeclSyntax("import SwiftSyntax")
for node in SYNTAX_NODES where node.isSyntaxCollection {
let elementType = node.collectionElementType
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableNodesFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableNodesFile.swift
index be0b3c963c9..9f15641ad96 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableNodesFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableNodesFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,11 +15,8 @@ import SwiftSyntaxBuilder
import SyntaxSupport
import Utils
-let buildableNodesFile = SourceFileSyntax {
- ImportDeclSyntax(
- leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntaxbuilder")),
- path: [AccessPathComponentSyntax(name: "SwiftSyntax")]
- )
+let buildableNodesFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntaxbuilder")) {
+ DeclSyntax("import SwiftSyntax")
for node in SYNTAX_NODES where node.isBuildable {
let type = node.type
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/ResultBuildersFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/ResultBuildersFile.swift
index 84b3981dd0f..2452b807626 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/ResultBuildersFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/ResultBuildersFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,11 +15,9 @@ import SyntaxSupport
import SwiftSyntaxBuilder
import Utils
-let resultBuildersFile = SourceFileSyntax {
- ImportDeclSyntax(
- leadingTrivia: .docLineComment(generateCopyrightHeader(for: "generate-swiftsyntaxbuilder")),
- path: [AccessPathComponentSyntax(name: "SwiftSyntax")]
- )
+let resultBuildersFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntaxbuilder")) {
+ DeclSyntax("import SwiftSyntax")
+
for node in SYNTAX_NODES where node.isSyntaxCollection {
let type = SyntaxBuildableType(syntaxKind: node.syntaxKind)
let elementType = node.collectionElementType
diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/SyntaxExpressibleByStringInterpolationConformancesFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/SyntaxExpressibleByStringInterpolationConformancesFile.swift
index 48ab7632ec6..a0da2637a7b 100644
--- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/SyntaxExpressibleByStringInterpolationConformancesFile.swift
+++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/SyntaxExpressibleByStringInterpolationConformancesFile.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,13 +15,8 @@ import SyntaxSupport
import SwiftSyntaxBuilder
import Utils
-let syntaxExpressibleByStringInterpolationConformancesFile = SourceFileSyntax {
- DeclSyntax(
- """
- \(raw: generateCopyrightHeader(for: "generate-swiftsyntaxbuilder"))
- import SwiftSyntax
- """
- )
+let syntaxExpressibleByStringInterpolationConformancesFile = SourceFileSyntax(leadingTrivia: generateCopyrightHeader(for: "generate-swiftsyntaxbuilder")) {
+ DeclSyntax("import SwiftSyntax")
DeclSyntax("import SwiftParser")
DeclSyntax("import SwiftParserDiagnostics")
diff --git a/EditorExtension/Host/HostApp.swift b/EditorExtension/Host/HostApp.swift
index 7d63c5e0da0..eba286194ff 100644
--- a/EditorExtension/Host/HostApp.swift
+++ b/EditorExtension/Host/HostApp.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/EditorExtension/Host/Info.plist b/EditorExtension/Host/Info.plist
index 704c6cde063..f581fce97f3 100644
--- a/EditorExtension/Host/Info.plist
+++ b/EditorExtension/Host/Info.plist
@@ -23,7 +23,7 @@
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
NSHumanReadableCopyright
- Copyright © 2022 Apple Inc. All rights reserved.
+ Copyright © 2023 Apple Inc. All rights reserved.
NSPrincipalClass
NSApplication
diff --git a/EditorExtension/SwiftRefactorExtension/Bridge.h b/EditorExtension/SwiftRefactorExtension/Bridge.h
index 8ed703accf4..cd85e5bca10 100644
--- a/EditorExtension/SwiftRefactorExtension/Bridge.h
+++ b/EditorExtension/SwiftRefactorExtension/Bridge.h
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/EditorExtension/SwiftRefactorExtension/CommandDiscovery.swift b/EditorExtension/SwiftRefactorExtension/CommandDiscovery.swift
index 8077c8be206..3e588ae0c40 100644
--- a/EditorExtension/SwiftRefactorExtension/CommandDiscovery.swift
+++ b/EditorExtension/SwiftRefactorExtension/CommandDiscovery.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/EditorExtension/SwiftRefactorExtension/Info.plist b/EditorExtension/SwiftRefactorExtension/Info.plist
index a3de54dcd44..963d23f0976 100644
--- a/EditorExtension/SwiftRefactorExtension/Info.plist
+++ b/EditorExtension/SwiftRefactorExtension/Info.plist
@@ -44,6 +44,6 @@
com.apple.dt.Xcode.extension.source-editor
NSHumanReadableCopyright
- Copyright © 2022 Apple Inc. All rights reserved.
+ Copyright © 2023 Apple Inc. All rights reserved.
diff --git a/EditorExtension/SwiftRefactorExtension/RefactoringRegistry.swift b/EditorExtension/SwiftRefactorExtension/RefactoringRegistry.swift
index 38e5cdd7db9..de50997bf81 100644
--- a/EditorExtension/SwiftRefactorExtension/RefactoringRegistry.swift
+++ b/EditorExtension/SwiftRefactorExtension/RefactoringRegistry.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/EditorExtension/SwiftRefactorExtension/SourceEditorCommand.swift b/EditorExtension/SwiftRefactorExtension/SourceEditorCommand.swift
index 6a0997c9cc3..724d85882a9 100644
--- a/EditorExtension/SwiftRefactorExtension/SourceEditorCommand.swift
+++ b/EditorExtension/SwiftRefactorExtension/SourceEditorCommand.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/EditorExtension/SwiftRefactorExtension/SourceEditorExtension.swift b/EditorExtension/SwiftRefactorExtension/SourceEditorExtension.swift
index 0b77af540ce..4080b69133e 100644
--- a/EditorExtension/SwiftRefactorExtension/SourceEditorExtension.swift
+++ b/EditorExtension/SwiftRefactorExtension/SourceEditorExtension.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/CMakeLists.txt b/Sources/CMakeLists.txt
index b9f206ea00f..16088765c7d 100644
--- a/Sources/CMakeLists.txt
+++ b/Sources/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/IDEUtils/CMakeLists.txt b/Sources/IDEUtils/CMakeLists.txt
index 8d9061700ba..bc07192f645 100644
--- a/Sources/IDEUtils/CMakeLists.txt
+++ b/Sources/IDEUtils/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/IDEUtils/Syntax+Classifications.swift b/Sources/IDEUtils/Syntax+Classifications.swift
index 8603956cfc2..86352dd9907 100644
--- a/Sources/IDEUtils/Syntax+Classifications.swift
+++ b/Sources/IDEUtils/Syntax+Classifications.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/IDEUtils/SyntaxClassifier.swift b/Sources/IDEUtils/SyntaxClassifier.swift
index 43c02bd8edb..169ce3172ab 100644
--- a/Sources/IDEUtils/SyntaxClassifier.swift
+++ b/Sources/IDEUtils/SyntaxClassifier.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/IDEUtils/generated/SyntaxClassification.swift b/Sources/IDEUtils/generated/SyntaxClassification.swift
index bfa8f9bbc66..117180081c5 100644
--- a/Sources/IDEUtils/generated/SyntaxClassification.swift
+++ b/Sources/IDEUtils/generated/SyntaxClassification.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,66 +13,65 @@
//
//===----------------------------------------------------------------------===//
-
@_spi(RawSyntax) import SwiftSyntax
public enum SyntaxClassification {
- /// The token should not receive syntax coloring.
- case none
+ /// An attribute starting with an `@`.
+ case attribute
- /// A Swift keyword, including contextual keywords.
- case keyword
+ /// A block comment starting with `/**` and ending with `*/.
+ case blockComment
- /// A generic identifier.
- case identifier
+ /// A build configuration directive like `#if`, `#elseif`, `#else`.
+ case buildConfigId
- /// An identifier referring to a type.
- case typeIdentifier
+ /// A doc block comment starting with `/**` and ending with `*/.
+ case docBlockComment
- /// An identifier referring to an operator.
- case operatorIdentifier
+ /// A doc line comment starting with `///`.
+ case docLineComment
/// An identifier starting with `$` like `$0`.
case dollarIdentifier
- /// An integer literal.
- case integerLiteral
+ /// An editor placeholder of the form `<#content#>`
+ case editorPlaceholder
/// A floating point literal.
case floatingLiteral
- /// A string literal including multiline string literals.
- case stringLiteral
+ /// A generic identifier.
+ case identifier
- /// The opening and closing parenthesis of string interpolation.
- case stringInterpolationAnchor
+ /// An integer literal.
+ case integerLiteral
- /// A `#` keyword like `#warning`.
- case poundDirectiveKeyword
+ /// A Swift keyword, including contextual keywords.
+ case keyword
- /// A build configuration directive like `#if`, `#elseif`, `#else`.
- case buildConfigId
+ /// A line comment starting with `//`.
+ case lineComment
- /// An attribute starting with an `@`.
- case attribute
+ /// The token should not receive syntax coloring.
+ case none
/// An image, color, etc. literal.
case objectLiteral
- /// An editor placeholder of the form `<#content#>`
- case editorPlaceholder
+ /// An identifier referring to an operator.
+ case operatorIdentifier
- /// A line comment starting with `//`.
- case lineComment
+ /// A `#` keyword like `#warning`.
+ case poundDirectiveKeyword
- /// A doc line comment starting with `///`.
- case docLineComment
+ /// The opening and closing parenthesis of string interpolation.
+ case stringInterpolationAnchor
- /// A block comment starting with `/**` and ending with `*/.
- case blockComment
+ /// A string literal including multiline string literals.
+ case stringLiteral
- /// A doc block comment starting with `/**` and ending with `*/.
- case docBlockComment
+ /// An identifier referring to a type.
+ case typeIdentifier
}
extension SyntaxClassification {
@@ -136,98 +135,98 @@ extension SyntaxClassification {
extension RawTokenKind {
internal var classification: SyntaxClassification {
switch self {
- case .wildcard:
- return .none
- case .leftParen:
- return .none
- case .rightParen:
- return .none
- case .leftBrace:
- return .none
- case .rightBrace:
- return .none
- case .leftSquareBracket:
- return .none
- case .rightSquareBracket:
+ case .arrow:
return .none
- case .leftAngle:
+ case .atSign:
+ return .attribute
+ case .backslash:
return .none
- case .rightAngle:
+ case .backtick:
return .none
- case .period:
+ case .binaryOperator:
+ return .operatorIdentifier
+ case .colon:
return .none
case .comma:
return .none
+ case .dollarIdentifier:
+ return .dollarIdentifier
case .ellipsis:
return .none
- case .colon:
- return .none
- case .semicolon:
- return .none
case .equal:
return .none
- case .atSign:
- return .attribute
- case .pound:
+ case .exclamationMark:
return .none
- case .prefixAmpersand:
+ case .floatingLiteral:
+ return .floatingLiteral
+ case .identifier:
+ return .identifier
+ case .infixQuestionMark:
return .none
- case .arrow:
+ case .integerLiteral:
+ return .integerLiteral
+ case .keyword:
+ return .keyword
+ case .leftAngle:
return .none
- case .backtick:
+ case .leftBrace:
return .none
- case .backslash:
+ case .leftParen:
return .none
- case .exclamationMark:
+ case .leftSquareBracket:
return .none
+ case .multilineStringQuote:
+ return .stringLiteral
+ case .period:
+ return .none
+ case .postfixOperator:
+ return .operatorIdentifier
case .postfixQuestionMark:
return .none
- case .infixQuestionMark:
+ case .pound:
return .none
- case .stringQuote:
- return .stringLiteral
- case .singleQuote:
- return .stringLiteral
- case .multilineStringQuote:
- return .stringLiteral
- case .poundSourceLocationKeyword:
- return .poundDirectiveKeyword
- case .poundIfKeyword:
- return .poundDirectiveKeyword
+ case .poundAvailableKeyword:
+ return .keyword
case .poundElseKeyword:
return .poundDirectiveKeyword
case .poundElseifKeyword:
return .poundDirectiveKeyword
case .poundEndifKeyword:
return .poundDirectiveKeyword
- case .poundAvailableKeyword:
- return .keyword
+ case .poundIfKeyword:
+ return .poundDirectiveKeyword
+ case .poundSourceLocationKeyword:
+ return .poundDirectiveKeyword
case .poundUnavailableKeyword:
return .keyword
- case .integerLiteral:
- return .integerLiteral
- case .floatingLiteral:
- return .floatingLiteral
- case .regexLiteral:
- return .none
- case .unknown:
+ case .prefixAmpersand:
return .none
- case .identifier:
- return .identifier
- case .binaryOperator:
- return .operatorIdentifier
- case .postfixOperator:
- return .operatorIdentifier
case .prefixOperator:
return .operatorIdentifier
- case .dollarIdentifier:
- return .dollarIdentifier
- case .keyword:
- return .keyword
case .rawStringDelimiter:
return .none
+ case .regexLiteral:
+ return .none
+ case .rightAngle:
+ return .none
+ case .rightBrace:
+ return .none
+ case .rightParen:
+ return .none
+ case .rightSquareBracket:
+ return .none
+ case .semicolon:
+ return .none
+ case .singleQuote:
+ return .stringLiteral
+ case .stringQuote:
+ return .stringLiteral
case .stringSegment:
return .stringLiteral
+ case .unknown:
+ return .none
+ case .wildcard:
+ return .none
case .eof:
return .none
}
diff --git a/Sources/SwiftBasicFormat/CMakeLists.txt b/Sources/SwiftBasicFormat/CMakeLists.txt
index 1b01786b5f9..6fe22217caa 100644
--- a/Sources/SwiftBasicFormat/CMakeLists.txt
+++ b/Sources/SwiftBasicFormat/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftBasicFormat/Trivia+Indented.swift b/Sources/SwiftBasicFormat/Trivia+Indented.swift
index 496ee754651..c20fcda5b22 100644
--- a/Sources/SwiftBasicFormat/Trivia+Indented.swift
+++ b/Sources/SwiftBasicFormat/Trivia+Indented.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftBasicFormat/generated/BasicFormat.swift b/Sources/SwiftBasicFormat/generated/BasicFormat.swift
index 5fb9f7ee581..1375e913977 100644
--- a/Sources/SwiftBasicFormat/generated/BasicFormat.swift
+++ b/Sources/SwiftBasicFormat/generated/BasicFormat.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,7 +13,6 @@
//
//===----------------------------------------------------------------------===//
-
import SwiftSyntax
open class BasicFormat: SyntaxRewriter {
@@ -159,14 +158,14 @@ open class BasicFormat: SyntaxRewriter {
break
}
switch token.tokenKind {
- case .leftBrace:
- return true
- case .equal:
- return true
case .arrow:
return true
case .binaryOperator:
return true
+ case .equal:
+ return true
+ case .leftBrace:
+ return true
case .keyword(.`catch`):
return true
case .keyword(.`in`):
@@ -222,17 +221,17 @@ open class BasicFormat: SyntaxRewriter {
break
}
switch token.tokenKind {
- case .comma:
+ case .arrow:
return true
- case .colon:
+ case .binaryOperator:
return true
- case .equal:
+ case .colon:
return true
- case .arrow:
+ case .comma:
return true
- case .poundSourceLocationKeyword:
+ case .equal:
return true
- case .poundIfKeyword:
+ case .poundAvailableKeyword:
return true
case .poundElseKeyword:
return true
@@ -240,11 +239,11 @@ open class BasicFormat: SyntaxRewriter {
return true
case .poundEndifKeyword:
return true
- case .poundAvailableKeyword:
+ case .poundIfKeyword:
return true
- case .poundUnavailableKeyword:
+ case .poundSourceLocationKeyword:
return true
- case .binaryOperator:
+ case .poundUnavailableKeyword:
return true
case .keyword(.`Any`):
return true
diff --git a/Sources/SwiftDiagnostics/CMakeLists.txt b/Sources/SwiftDiagnostics/CMakeLists.txt
index a095a986c58..1b6bf797bc9 100644
--- a/Sources/SwiftDiagnostics/CMakeLists.txt
+++ b/Sources/SwiftDiagnostics/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftDiagnostics/Diagnostic.swift b/Sources/SwiftDiagnostics/Diagnostic.swift
index 574b78505f2..58ecf4ad18d 100644
--- a/Sources/SwiftDiagnostics/Diagnostic.swift
+++ b/Sources/SwiftDiagnostics/Diagnostic.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftDiagnostics/DiagnosticsFormatter.swift b/Sources/SwiftDiagnostics/DiagnosticsFormatter.swift
index dffd0ae4096..2217ac677e3 100644
--- a/Sources/SwiftDiagnostics/DiagnosticsFormatter.swift
+++ b/Sources/SwiftDiagnostics/DiagnosticsFormatter.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftDiagnostics/FixIt.swift b/Sources/SwiftDiagnostics/FixIt.swift
index 238971bb33e..72961fea3f6 100644
--- a/Sources/SwiftDiagnostics/FixIt.swift
+++ b/Sources/SwiftDiagnostics/FixIt.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftDiagnostics/Message.swift b/Sources/SwiftDiagnostics/Message.swift
index 1aeba5e2fb1..dba55df09ba 100644
--- a/Sources/SwiftDiagnostics/Message.swift
+++ b/Sources/SwiftDiagnostics/Message.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftDiagnostics/Note.swift b/Sources/SwiftDiagnostics/Note.swift
index 4bb86e30187..e4c8b962a5e 100644
--- a/Sources/SwiftDiagnostics/Note.swift
+++ b/Sources/SwiftDiagnostics/Note.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/CMakeLists.txt b/Sources/SwiftOperators/CMakeLists.txt
index b6c802991f2..886590411b1 100644
--- a/Sources/SwiftOperators/CMakeLists.txt
+++ b/Sources/SwiftOperators/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/Operator.swift b/Sources/SwiftOperators/Operator.swift
index 9c877c34044..fde1e65bf80 100644
--- a/Sources/SwiftOperators/Operator.swift
+++ b/Sources/SwiftOperators/Operator.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/OperatorError+Diagnostics.swift b/Sources/SwiftOperators/OperatorError+Diagnostics.swift
index 2c279ec6804..35bc1a1b9a0 100644
--- a/Sources/SwiftOperators/OperatorError+Diagnostics.swift
+++ b/Sources/SwiftOperators/OperatorError+Diagnostics.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/OperatorError.swift b/Sources/SwiftOperators/OperatorError.swift
index 5402d73bb6e..37ab188e7b6 100644
--- a/Sources/SwiftOperators/OperatorError.swift
+++ b/Sources/SwiftOperators/OperatorError.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/OperatorTable+Defaults.swift b/Sources/SwiftOperators/OperatorTable+Defaults.swift
index 227acd9c62e..f53937221fb 100644
--- a/Sources/SwiftOperators/OperatorTable+Defaults.swift
+++ b/Sources/SwiftOperators/OperatorTable+Defaults.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/OperatorTable+Folding.swift b/Sources/SwiftOperators/OperatorTable+Folding.swift
index e3c6dd50a0e..d1b2cd454d6 100644
--- a/Sources/SwiftOperators/OperatorTable+Folding.swift
+++ b/Sources/SwiftOperators/OperatorTable+Folding.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/OperatorTable+Semantics.swift b/Sources/SwiftOperators/OperatorTable+Semantics.swift
index add11d4f862..58574388492 100644
--- a/Sources/SwiftOperators/OperatorTable+Semantics.swift
+++ b/Sources/SwiftOperators/OperatorTable+Semantics.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/OperatorTable.swift b/Sources/SwiftOperators/OperatorTable.swift
index c616eb96f2e..5ff34872e5b 100644
--- a/Sources/SwiftOperators/OperatorTable.swift
+++ b/Sources/SwiftOperators/OperatorTable.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/PrecedenceGraph.swift b/Sources/SwiftOperators/PrecedenceGraph.swift
index 56da0c5627f..863fb4d5020 100644
--- a/Sources/SwiftOperators/PrecedenceGraph.swift
+++ b/Sources/SwiftOperators/PrecedenceGraph.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/PrecedenceGroup.swift b/Sources/SwiftOperators/PrecedenceGroup.swift
index de5e284d521..5b7b54a37da 100644
--- a/Sources/SwiftOperators/PrecedenceGroup.swift
+++ b/Sources/SwiftOperators/PrecedenceGroup.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftOperators/SyntaxSynthesis.swift b/Sources/SwiftOperators/SyntaxSynthesis.swift
index 403667c300c..e19158d5584 100644
--- a/Sources/SwiftOperators/SyntaxSynthesis.swift
+++ b/Sources/SwiftOperators/SyntaxSynthesis.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Attributes.swift b/Sources/SwiftParser/Attributes.swift
index b6106161dab..4e64905b323 100644
--- a/Sources/SwiftParser/Attributes.swift
+++ b/Sources/SwiftParser/Attributes.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Availability.swift b/Sources/SwiftParser/Availability.swift
index 8f7af2ea6e6..a6d6be4ebe1 100644
--- a/Sources/SwiftParser/Availability.swift
+++ b/Sources/SwiftParser/Availability.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/CMakeLists.txt b/Sources/SwiftParser/CMakeLists.txt
index dd24459474c..04cd4f94900 100644
--- a/Sources/SwiftParser/CMakeLists.txt
+++ b/Sources/SwiftParser/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/CharacterInfo.swift b/Sources/SwiftParser/CharacterInfo.swift
index f335e26d2c7..17e9d63ef54 100644
--- a/Sources/SwiftParser/CharacterInfo.swift
+++ b/Sources/SwiftParser/CharacterInfo.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Declarations.swift b/Sources/SwiftParser/Declarations.swift
index 9ce538da2f3..49d73890901 100644
--- a/Sources/SwiftParser/Declarations.swift
+++ b/Sources/SwiftParser/Declarations.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Directives.swift b/Sources/SwiftParser/Directives.swift
index a71085a2c79..95ad35d999f 100644
--- a/Sources/SwiftParser/Directives.swift
+++ b/Sources/SwiftParser/Directives.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Expressions.swift b/Sources/SwiftParser/Expressions.swift
index e192acf9ee0..8183289f3c5 100644
--- a/Sources/SwiftParser/Expressions.swift
+++ b/Sources/SwiftParser/Expressions.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Lexer/Lexer.swift b/Sources/SwiftParser/Lexer/Lexer.swift
index 5d863cba524..bbf81c3b070 100644
--- a/Sources/SwiftParser/Lexer/Lexer.swift
+++ b/Sources/SwiftParser/Lexer/Lexer.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Lookahead.swift b/Sources/SwiftParser/Lookahead.swift
index 81db04c9100..cc437c6e8be 100644
--- a/Sources/SwiftParser/Lookahead.swift
+++ b/Sources/SwiftParser/Lookahead.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/LoopProgressCondition.swift b/Sources/SwiftParser/LoopProgressCondition.swift
index a15f0cc9e92..95742fd9af7 100644
--- a/Sources/SwiftParser/LoopProgressCondition.swift
+++ b/Sources/SwiftParser/LoopProgressCondition.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Modifiers.swift b/Sources/SwiftParser/Modifiers.swift
index e56ccd197dd..36371b976d3 100644
--- a/Sources/SwiftParser/Modifiers.swift
+++ b/Sources/SwiftParser/Modifiers.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Names.swift b/Sources/SwiftParser/Names.swift
index 5f9cf1e89c2..5d6b624e897 100644
--- a/Sources/SwiftParser/Names.swift
+++ b/Sources/SwiftParser/Names.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Nominals.swift b/Sources/SwiftParser/Nominals.swift
index 95209c4b160..1c2ad7fc691 100644
--- a/Sources/SwiftParser/Nominals.swift
+++ b/Sources/SwiftParser/Nominals.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Parser.swift b/Sources/SwiftParser/Parser.swift
index a47c2d8d193..148b902066f 100644
--- a/Sources/SwiftParser/Parser.swift
+++ b/Sources/SwiftParser/Parser.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Patterns.swift b/Sources/SwiftParser/Patterns.swift
index a899069b2fc..c7c2f540e97 100644
--- a/Sources/SwiftParser/Patterns.swift
+++ b/Sources/SwiftParser/Patterns.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Recovery.swift b/Sources/SwiftParser/Recovery.swift
index a506c64d9b4..21b4f7f7c9e 100644
--- a/Sources/SwiftParser/Recovery.swift
+++ b/Sources/SwiftParser/Recovery.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Statements.swift b/Sources/SwiftParser/Statements.swift
index 54b39ee3c78..5763bfca500 100644
--- a/Sources/SwiftParser/Statements.swift
+++ b/Sources/SwiftParser/Statements.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/SyntaxUtils.swift b/Sources/SwiftParser/SyntaxUtils.swift
index 5ff0685b819..c6860e0d8bd 100644
--- a/Sources/SwiftParser/SyntaxUtils.swift
+++ b/Sources/SwiftParser/SyntaxUtils.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/TokenConsumer.swift b/Sources/SwiftParser/TokenConsumer.swift
index e3614b65faa..69ab36ffa27 100644
--- a/Sources/SwiftParser/TokenConsumer.swift
+++ b/Sources/SwiftParser/TokenConsumer.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/TokenPrecedence.swift b/Sources/SwiftParser/TokenPrecedence.swift
index 92c94b6cef3..e4b8bc44018 100644
--- a/Sources/SwiftParser/TokenPrecedence.swift
+++ b/Sources/SwiftParser/TokenPrecedence.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/TokenSpec.swift b/Sources/SwiftParser/TokenSpec.swift
index 32ba8494b7a..f7f8059f963 100644
--- a/Sources/SwiftParser/TokenSpec.swift
+++ b/Sources/SwiftParser/TokenSpec.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/TokenSpecSet.swift b/Sources/SwiftParser/TokenSpecSet.swift
index 72c5bc512b9..b135d5fab8a 100644
--- a/Sources/SwiftParser/TokenSpecSet.swift
+++ b/Sources/SwiftParser/TokenSpecSet.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/TopLevel.swift b/Sources/SwiftParser/TopLevel.swift
index 2278e7617d5..89397f4b2d8 100644
--- a/Sources/SwiftParser/TopLevel.swift
+++ b/Sources/SwiftParser/TopLevel.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/TriviaParser.swift b/Sources/SwiftParser/TriviaParser.swift
index e287e2f36f5..02833775b4c 100644
--- a/Sources/SwiftParser/TriviaParser.swift
+++ b/Sources/SwiftParser/TriviaParser.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/Types.swift b/Sources/SwiftParser/Types.swift
index d9dfa257a4b..6e8962e50b0 100644
--- a/Sources/SwiftParser/Types.swift
+++ b/Sources/SwiftParser/Types.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParser/generated/DeclarationModifier.swift b/Sources/SwiftParser/generated/DeclarationModifier.swift
index e8b730f4131..7fdaeeb391b 100644
--- a/Sources/SwiftParser/generated/DeclarationModifier.swift
+++ b/Sources/SwiftParser/generated/DeclarationModifier.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,7 +13,6 @@
//
//===----------------------------------------------------------------------===//
-
@_spi(RawSyntax) import SwiftSyntax
enum DeclarationModifier: TokenSpecSet {
diff --git a/Sources/SwiftParser/generated/Parser+Entry.swift b/Sources/SwiftParser/generated/Parser+Entry.swift
index 5a79e2de1e1..211beca8571 100644
--- a/Sources/SwiftParser/generated/Parser+Entry.swift
+++ b/Sources/SwiftParser/generated/Parser+Entry.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,7 +13,6 @@
//
//===----------------------------------------------------------------------===//
-
@_spi(RawSyntax) import SwiftSyntax
extension Parser {
diff --git a/Sources/SwiftParser/generated/TokenSpecStaticMembers.swift b/Sources/SwiftParser/generated/TokenSpecStaticMembers.swift
index b7b0ef05e05..dad79dbdb23 100644
--- a/Sources/SwiftParser/generated/TokenSpecStaticMembers.swift
+++ b/Sources/SwiftParser/generated/TokenSpecStaticMembers.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -20,120 +20,104 @@ extension TokenSpec {
return TokenSpec(.eof)
}
- static var wildcard: TokenSpec {
- return TokenSpec(.wildcard)
- }
-
- static var leftParen: TokenSpec {
- return TokenSpec(.leftParen)
- }
-
- static var rightParen: TokenSpec {
- return TokenSpec(.rightParen)
- }
-
- static var leftBrace: TokenSpec {
- return TokenSpec(.leftBrace)
- }
-
- static var rightBrace: TokenSpec {
- return TokenSpec(.rightBrace)
+ static var arrow: TokenSpec {
+ return TokenSpec(.arrow)
}
- static var leftSquareBracket: TokenSpec {
- return TokenSpec(.leftSquareBracket)
+ static var atSign: TokenSpec {
+ return TokenSpec(.atSign)
}
- static var rightSquareBracket: TokenSpec {
- return TokenSpec(.rightSquareBracket)
+ static var backslash: TokenSpec {
+ return TokenSpec(.backslash)
}
- static var leftAngle: TokenSpec {
- return TokenSpec(.leftAngle)
+ static var backtick: TokenSpec {
+ return TokenSpec(.backtick)
}
- static var rightAngle: TokenSpec {
- return TokenSpec(.rightAngle)
+ static var binaryOperator: TokenSpec {
+ return TokenSpec(.binaryOperator)
}
- static var period: TokenSpec {
- return TokenSpec(.period)
+ static var colon: TokenSpec {
+ return TokenSpec(.colon)
}
static var comma: TokenSpec {
return TokenSpec(.comma)
}
- static var ellipsis: TokenSpec {
- return TokenSpec(.ellipsis)
- }
-
- static var colon: TokenSpec {
- return TokenSpec(.colon)
+ static var dollarIdentifier: TokenSpec {
+ return TokenSpec(.dollarIdentifier)
}
- static var semicolon: TokenSpec {
- return TokenSpec(.semicolon)
+ static var ellipsis: TokenSpec {
+ return TokenSpec(.ellipsis)
}
static var equal: TokenSpec {
return TokenSpec(.equal)
}
- static var atSign: TokenSpec {
- return TokenSpec(.atSign)
+ static var exclamationMark: TokenSpec {
+ return TokenSpec(.exclamationMark)
}
- static var pound: TokenSpec {
- return TokenSpec(.pound)
+ static var floatingLiteral: TokenSpec {
+ return TokenSpec(.floatingLiteral)
}
- static var prefixAmpersand: TokenSpec {
- return TokenSpec(.prefixAmpersand)
+ static var identifier: TokenSpec {
+ return TokenSpec(.identifier)
}
- static var arrow: TokenSpec {
- return TokenSpec(.arrow)
+ static var infixQuestionMark: TokenSpec {
+ return TokenSpec(.infixQuestionMark)
}
- static var backtick: TokenSpec {
- return TokenSpec(.backtick)
+ static var integerLiteral: TokenSpec {
+ return TokenSpec(.integerLiteral)
}
- static var backslash: TokenSpec {
- return TokenSpec(.backslash)
+ static var leftAngle: TokenSpec {
+ return TokenSpec(.leftAngle)
}
- static var exclamationMark: TokenSpec {
- return TokenSpec(.exclamationMark)
+ static var leftBrace: TokenSpec {
+ return TokenSpec(.leftBrace)
}
- static var postfixQuestionMark: TokenSpec {
- return TokenSpec(.postfixQuestionMark)
+ static var leftParen: TokenSpec {
+ return TokenSpec(.leftParen)
}
- static var infixQuestionMark: TokenSpec {
- return TokenSpec(.infixQuestionMark)
+ static var leftSquareBracket: TokenSpec {
+ return TokenSpec(.leftSquareBracket)
}
- static var stringQuote: TokenSpec {
- return TokenSpec(.stringQuote)
+ static var multilineStringQuote: TokenSpec {
+ return TokenSpec(.multilineStringQuote)
}
- static var singleQuote: TokenSpec {
- return TokenSpec(.singleQuote)
+ static var period: TokenSpec {
+ return TokenSpec(.period)
}
- static var multilineStringQuote: TokenSpec {
- return TokenSpec(.multilineStringQuote)
+ static var postfixOperator: TokenSpec {
+ return TokenSpec(.postfixOperator)
}
- static var poundSourceLocationKeyword: TokenSpec {
- return TokenSpec(.poundSourceLocationKeyword)
+ static var postfixQuestionMark: TokenSpec {
+ return TokenSpec(.postfixQuestionMark)
}
- static var poundIfKeyword: TokenSpec {
- return TokenSpec(.poundIfKeyword)
+ static var pound: TokenSpec {
+ return TokenSpec(.pound)
+ }
+
+ static var poundAvailableKeyword: TokenSpec {
+ return TokenSpec(.poundAvailableKeyword)
}
static var poundElseKeyword: TokenSpec {
@@ -148,58 +132,74 @@ extension TokenSpec {
return TokenSpec(.poundEndifKeyword)
}
- static var poundAvailableKeyword: TokenSpec {
- return TokenSpec(.poundAvailableKeyword)
+ static var poundIfKeyword: TokenSpec {
+ return TokenSpec(.poundIfKeyword)
+ }
+
+ static var poundSourceLocationKeyword: TokenSpec {
+ return TokenSpec(.poundSourceLocationKeyword)
}
static var poundUnavailableKeyword: TokenSpec {
return TokenSpec(.poundUnavailableKeyword)
}
- static var integerLiteral: TokenSpec {
- return TokenSpec(.integerLiteral)
+ static var prefixAmpersand: TokenSpec {
+ return TokenSpec(.prefixAmpersand)
}
- static var floatingLiteral: TokenSpec {
- return TokenSpec(.floatingLiteral)
+ static var prefixOperator: TokenSpec {
+ return TokenSpec(.prefixOperator)
+ }
+
+ static var rawStringDelimiter: TokenSpec {
+ return TokenSpec(.rawStringDelimiter)
}
static var regexLiteral: TokenSpec {
return TokenSpec(.regexLiteral)
}
- static var unknown: TokenSpec {
- return TokenSpec(.unknown)
+ static var rightAngle: TokenSpec {
+ return TokenSpec(.rightAngle)
}
- static var identifier: TokenSpec {
- return TokenSpec(.identifier)
+ static var rightBrace: TokenSpec {
+ return TokenSpec(.rightBrace)
}
- static var binaryOperator: TokenSpec {
- return TokenSpec(.binaryOperator)
+ static var rightParen: TokenSpec {
+ return TokenSpec(.rightParen)
}
- static var postfixOperator: TokenSpec {
- return TokenSpec(.postfixOperator)
+ static var rightSquareBracket: TokenSpec {
+ return TokenSpec(.rightSquareBracket)
}
- static var prefixOperator: TokenSpec {
- return TokenSpec(.prefixOperator)
+ static var semicolon: TokenSpec {
+ return TokenSpec(.semicolon)
}
- static var dollarIdentifier: TokenSpec {
- return TokenSpec(.dollarIdentifier)
+ static var singleQuote: TokenSpec {
+ return TokenSpec(.singleQuote)
}
- static var rawStringDelimiter: TokenSpec {
- return TokenSpec(.rawStringDelimiter)
+ static var stringQuote: TokenSpec {
+ return TokenSpec(.stringQuote)
}
static var stringSegment: TokenSpec {
return TokenSpec(.stringSegment)
}
+ static var unknown: TokenSpec {
+ return TokenSpec(.unknown)
+ }
+
+ static var wildcard: TokenSpec {
+ return TokenSpec(.wildcard)
+ }
+
static func keyword(_ keyword: Keyword) -> TokenSpec {
return TokenSpec(keyword)
}
diff --git a/Sources/SwiftParser/generated/TypeAttribute.swift b/Sources/SwiftParser/generated/TypeAttribute.swift
index fd2ad53f1ec..1a2f8b12e46 100644
--- a/Sources/SwiftParser/generated/TypeAttribute.swift
+++ b/Sources/SwiftParser/generated/TypeAttribute.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,7 +13,6 @@
//
//===----------------------------------------------------------------------===//
-
@_spi(RawSyntax) import SwiftSyntax
extension Parser {
diff --git a/Sources/SwiftParserDiagnostics/CMakeLists.txt b/Sources/SwiftParserDiagnostics/CMakeLists.txt
index 1355c39c1b9..b1e5f75bae8 100644
--- a/Sources/SwiftParserDiagnostics/CMakeLists.txt
+++ b/Sources/SwiftParserDiagnostics/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParserDiagnostics/DiagnosticExtensions.swift b/Sources/SwiftParserDiagnostics/DiagnosticExtensions.swift
index 86ba93252ae..63543a6d207 100644
--- a/Sources/SwiftParserDiagnostics/DiagnosticExtensions.swift
+++ b/Sources/SwiftParserDiagnostics/DiagnosticExtensions.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift b/Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift
index 98856674154..be345934a03 100644
--- a/Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift
+++ b/Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParserDiagnostics/MissingNodesError.swift b/Sources/SwiftParserDiagnostics/MissingNodesError.swift
index 1d3fa1c5260..99d0a2d2009 100644
--- a/Sources/SwiftParserDiagnostics/MissingNodesError.swift
+++ b/Sources/SwiftParserDiagnostics/MissingNodesError.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParserDiagnostics/MultiLineStringLiteralDiagnoticsGenerator.swift b/Sources/SwiftParserDiagnostics/MultiLineStringLiteralDiagnoticsGenerator.swift
index 7f2bf19f201..b7dfcf42dee 100644
--- a/Sources/SwiftParserDiagnostics/MultiLineStringLiteralDiagnoticsGenerator.swift
+++ b/Sources/SwiftParserDiagnostics/MultiLineStringLiteralDiagnoticsGenerator.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift b/Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift
index 9303edc4716..6979a9db326 100644
--- a/Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift
+++ b/Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift b/Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift
index 64d2da53b45..7ccb18cafcb 100644
--- a/Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift
+++ b/Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParserDiagnostics/PresenceUtils.swift b/Sources/SwiftParserDiagnostics/PresenceUtils.swift
index f2e7f48c598..e52c0d766c3 100644
--- a/Sources/SwiftParserDiagnostics/PresenceUtils.swift
+++ b/Sources/SwiftParserDiagnostics/PresenceUtils.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParserDiagnostics/SyntaxExtensions.swift b/Sources/SwiftParserDiagnostics/SyntaxExtensions.swift
index 93d6404f7db..df6d38a5781 100644
--- a/Sources/SwiftParserDiagnostics/SyntaxExtensions.swift
+++ b/Sources/SwiftParserDiagnostics/SyntaxExtensions.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftParserDiagnostics/Utils.swift b/Sources/SwiftParserDiagnostics/Utils.swift
index 7f7742d17c8..db313621608 100644
--- a/Sources/SwiftParserDiagnostics/Utils.swift
+++ b/Sources/SwiftParserDiagnostics/Utils.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftRefactor/AddSeparatorsToIntegerLiteral.swift b/Sources/SwiftRefactor/AddSeparatorsToIntegerLiteral.swift
index 4a2a6879499..b75cd020a0e 100644
--- a/Sources/SwiftRefactor/AddSeparatorsToIntegerLiteral.swift
+++ b/Sources/SwiftRefactor/AddSeparatorsToIntegerLiteral.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftRefactor/FormatRawStringLiteral.swift b/Sources/SwiftRefactor/FormatRawStringLiteral.swift
index 4389b5d59ff..ada7682a1e2 100644
--- a/Sources/SwiftRefactor/FormatRawStringLiteral.swift
+++ b/Sources/SwiftRefactor/FormatRawStringLiteral.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftRefactor/IntegerLiteralUtilities.swift b/Sources/SwiftRefactor/IntegerLiteralUtilities.swift
index 17ec1111554..c39b3cd530c 100644
--- a/Sources/SwiftRefactor/IntegerLiteralUtilities.swift
+++ b/Sources/SwiftRefactor/IntegerLiteralUtilities.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftRefactor/MigrateToNewIfLetSyntax.swift b/Sources/SwiftRefactor/MigrateToNewIfLetSyntax.swift
index 7c3dfe93925..3fd906cb73d 100644
--- a/Sources/SwiftRefactor/MigrateToNewIfLetSyntax.swift
+++ b/Sources/SwiftRefactor/MigrateToNewIfLetSyntax.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftRefactor/OpaqueParameterToGeneric.swift b/Sources/SwiftRefactor/OpaqueParameterToGeneric.swift
index c91b45f01f0..fb513830d11 100644
--- a/Sources/SwiftRefactor/OpaqueParameterToGeneric.swift
+++ b/Sources/SwiftRefactor/OpaqueParameterToGeneric.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftRefactor/RefactoringProvider.swift b/Sources/SwiftRefactor/RefactoringProvider.swift
index 9cf121c9fa4..16a92995a9f 100644
--- a/Sources/SwiftRefactor/RefactoringProvider.swift
+++ b/Sources/SwiftRefactor/RefactoringProvider.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftRefactor/RemoveSeparatorsFromIntegerLiteral.swift b/Sources/SwiftRefactor/RemoveSeparatorsFromIntegerLiteral.swift
index b53cf81292e..880b543fed8 100644
--- a/Sources/SwiftRefactor/RemoveSeparatorsFromIntegerLiteral.swift
+++ b/Sources/SwiftRefactor/RemoveSeparatorsFromIntegerLiteral.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/AbsolutePosition.swift b/Sources/SwiftSyntax/AbsolutePosition.swift
index 6f8abfbff35..e4e746d96e8 100644
--- a/Sources/SwiftSyntax/AbsolutePosition.swift
+++ b/Sources/SwiftSyntax/AbsolutePosition.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/BumpPtrAllocator.swift b/Sources/SwiftSyntax/BumpPtrAllocator.swift
index d8594104c50..b9be43fbc34 100644
--- a/Sources/SwiftSyntax/BumpPtrAllocator.swift
+++ b/Sources/SwiftSyntax/BumpPtrAllocator.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/CMakeLists.txt b/Sources/SwiftSyntax/CMakeLists.txt
index 211fbcd8cd9..9a92b5e57eb 100644
--- a/Sources/SwiftSyntax/CMakeLists.txt
+++ b/Sources/SwiftSyntax/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/CommonAncestor.swift b/Sources/SwiftSyntax/CommonAncestor.swift
index 315db222774..be6b46485b5 100644
--- a/Sources/SwiftSyntax/CommonAncestor.swift
+++ b/Sources/SwiftSyntax/CommonAncestor.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/IncrementalParseTransition.swift b/Sources/SwiftSyntax/IncrementalParseTransition.swift
index af37fe6a319..71a95ab0623 100644
--- a/Sources/SwiftSyntax/IncrementalParseTransition.swift
+++ b/Sources/SwiftSyntax/IncrementalParseTransition.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/MemoryLayout.swift b/Sources/SwiftSyntax/MemoryLayout.swift
index 698aa846687..c421c623396 100644
--- a/Sources/SwiftSyntax/MemoryLayout.swift
+++ b/Sources/SwiftSyntax/MemoryLayout.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/Raw/RawSyntax.swift b/Sources/SwiftSyntax/Raw/RawSyntax.swift
index 892a30adca8..1252b771226 100644
--- a/Sources/SwiftSyntax/Raw/RawSyntax.swift
+++ b/Sources/SwiftSyntax/Raw/RawSyntax.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift b/Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift
index 61ea976f9ca..5ecf8edae7b 100644
--- a/Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift
+++ b/Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/Raw/RawSyntaxNodeProtocol.swift b/Sources/SwiftSyntax/Raw/RawSyntaxNodeProtocol.swift
index 352ba5005e5..1e0d7444982 100644
--- a/Sources/SwiftSyntax/Raw/RawSyntaxNodeProtocol.swift
+++ b/Sources/SwiftSyntax/Raw/RawSyntaxNodeProtocol.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/Raw/RawSyntaxTokenView.swift b/Sources/SwiftSyntax/Raw/RawSyntaxTokenView.swift
index b38ec09ba88..f7dacd09f59 100644
--- a/Sources/SwiftSyntax/Raw/RawSyntaxTokenView.swift
+++ b/Sources/SwiftSyntax/Raw/RawSyntaxTokenView.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/Raw/RawSyntaxValidation.swift.gyb b/Sources/SwiftSyntax/Raw/RawSyntaxValidation.swift.gyb
index 841822ea713..fa68e08d51b 100644
--- a/Sources/SwiftSyntax/Raw/RawSyntaxValidation.swift.gyb
+++ b/Sources/SwiftSyntax/Raw/RawSyntaxValidation.swift.gyb
@@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/Raw/gyb_generated/RawSyntaxValidation.swift b/Sources/SwiftSyntax/Raw/gyb_generated/RawSyntaxValidation.swift
index 4cee69db3c2..57d4c65ef01 100644
--- a/Sources/SwiftSyntax/Raw/gyb_generated/RawSyntaxValidation.swift
+++ b/Sources/SwiftSyntax/Raw/gyb_generated/RawSyntaxValidation.swift
@@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/SourceLength.swift b/Sources/SwiftSyntax/SourceLength.swift
index c020fed709b..1b12ec0a01a 100644
--- a/Sources/SwiftSyntax/SourceLength.swift
+++ b/Sources/SwiftSyntax/SourceLength.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/SourceLocation.swift b/Sources/SwiftSyntax/SourceLocation.swift
index a5856e606dc..aeff846c414 100644
--- a/Sources/SwiftSyntax/SourceLocation.swift
+++ b/Sources/SwiftSyntax/SourceLocation.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/SourcePresence.swift b/Sources/SwiftSyntax/SourcePresence.swift
index 70b7be12c6a..f0bc492fbf7 100644
--- a/Sources/SwiftSyntax/SourcePresence.swift
+++ b/Sources/SwiftSyntax/SourcePresence.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/Syntax.swift b/Sources/SwiftSyntax/Syntax.swift
index fe14df2913d..ef1c2789f51 100644
--- a/Sources/SwiftSyntax/Syntax.swift
+++ b/Sources/SwiftSyntax/Syntax.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/SyntaxArena.swift b/Sources/SwiftSyntax/SyntaxArena.swift
index 317f1aeafae..5a4f03eecb4 100644
--- a/Sources/SwiftSyntax/SyntaxArena.swift
+++ b/Sources/SwiftSyntax/SyntaxArena.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/SyntaxChildren.swift b/Sources/SwiftSyntax/SyntaxChildren.swift
index d44ab075239..6eb2d788ef0 100644
--- a/Sources/SwiftSyntax/SyntaxChildren.swift
+++ b/Sources/SwiftSyntax/SyntaxChildren.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/SyntaxData.swift b/Sources/SwiftSyntax/SyntaxData.swift
index 0ebc0e0d4c8..5a14b338650 100644
--- a/Sources/SwiftSyntax/SyntaxData.swift
+++ b/Sources/SwiftSyntax/SyntaxData.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/SyntaxOtherNodes.swift b/Sources/SwiftSyntax/SyntaxOtherNodes.swift
index fae64659c85..36ee075dca4 100644
--- a/Sources/SwiftSyntax/SyntaxOtherNodes.swift
+++ b/Sources/SwiftSyntax/SyntaxOtherNodes.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/SyntaxText.swift b/Sources/SwiftSyntax/SyntaxText.swift
index fe2fd20c772..53b9ce1f934 100644
--- a/Sources/SwiftSyntax/SyntaxText.swift
+++ b/Sources/SwiftSyntax/SyntaxText.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/SyntaxTreeViewMode.swift b/Sources/SwiftSyntax/SyntaxTreeViewMode.swift
index bfa458ff3c6..f5a6c06b019 100644
--- a/Sources/SwiftSyntax/SyntaxTreeViewMode.swift
+++ b/Sources/SwiftSyntax/SyntaxTreeViewMode.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/TokenDiagnostic.swift b/Sources/SwiftSyntax/TokenDiagnostic.swift
index 966b0e54f72..0a4277bc3d8 100644
--- a/Sources/SwiftSyntax/TokenDiagnostic.swift
+++ b/Sources/SwiftSyntax/TokenDiagnostic.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/Utils.swift b/Sources/SwiftSyntax/Utils.swift
index a58ae1c7ef2..e7b5055fbe9 100644
--- a/Sources/SwiftSyntax/Utils.swift
+++ b/Sources/SwiftSyntax/Utils.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/Keyword.swift b/Sources/SwiftSyntax/generated/Keyword.swift
index fe883aa9341..f7727325530 100644
--- a/Sources/SwiftSyntax/generated/Keyword.swift
+++ b/Sources/SwiftSyntax/generated/Keyword.swift
@@ -1,12 +1,12 @@
-//// Automatically Generated by generate-swiftparser
+//// Automatically Generated by generate-swiftsyntax
//// Do Not Edit Directly!
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -14,8 +14,6 @@
//
//===----------------------------------------------------------------------===//
-
-
/// Make `StaticString` equatable so we can use it as the raw value for Keyword.
extension StaticString: Equatable {
public static func == (lhs: StaticString, rhs: StaticString) -> Bool {
diff --git a/Sources/SwiftSyntax/generated/Misc.swift b/Sources/SwiftSyntax/generated/Misc.swift
index 1e39256a41e..735ed722d6e 100644
--- a/Sources/SwiftSyntax/generated/Misc.swift
+++ b/Sources/SwiftSyntax/generated/Misc.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -14,7 +14,6 @@
//
//===----------------------------------------------------------------------===//
-
extension Syntax {
public static var structure: SyntaxNodeStructure {
return .choices([
diff --git a/Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift b/Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift
index 0cc69fec77d..685714c3ab1 100644
--- a/Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift
+++ b/Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -14,8 +14,6 @@
//
//===----------------------------------------------------------------------===//
-
-
/// A `SyntaxVisitor` that can visit the nodes as generic `Syntax` values.
///
/// This subclass of `SyntaxVisitor` is slower than the type-specific visitation
diff --git a/Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift b/Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift
index 45c52b863b5..b1d5b254d6c 100644
--- a/Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift
+++ b/Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/SyntaxCollections.swift b/Sources/SwiftSyntax/generated/SyntaxCollections.swift
index 154b34659a1..7e36d7e0f88 100644
--- a/Sources/SwiftSyntax/generated/SyntaxCollections.swift
+++ b/Sources/SwiftSyntax/generated/SyntaxCollections.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/SyntaxEnum.swift b/Sources/SwiftSyntax/generated/SyntaxEnum.swift
index e1f3088ea7e..463e24197da 100644
--- a/Sources/SwiftSyntax/generated/SyntaxEnum.swift
+++ b/Sources/SwiftSyntax/generated/SyntaxEnum.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/SyntaxKind.swift b/Sources/SwiftSyntax/generated/SyntaxKind.swift
index 9bd133b1872..fd16df1cd63 100644
--- a/Sources/SwiftSyntax/generated/SyntaxKind.swift
+++ b/Sources/SwiftSyntax/generated/SyntaxKind.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/SyntaxRewriter.swift b/Sources/SwiftSyntax/generated/SyntaxRewriter.swift
index 497aa49416e..ece35903da5 100644
--- a/Sources/SwiftSyntax/generated/SyntaxRewriter.swift
+++ b/Sources/SwiftSyntax/generated/SyntaxRewriter.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/SyntaxTraits.swift b/Sources/SwiftSyntax/generated/SyntaxTraits.swift
index c6e861d1a0c..5f2068d9630 100644
--- a/Sources/SwiftSyntax/generated/SyntaxTraits.swift
+++ b/Sources/SwiftSyntax/generated/SyntaxTraits.swift
@@ -1,5 +1,19 @@
+//// Automatically Generated by generate-swiftsyntax
+//// Do Not Edit Directly!
+//===----------------------------------------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
// MARK: - AttributedSyntax
public protocol AttributedSyntax: SyntaxProtocol {
@@ -36,52 +50,6 @@ public extension SyntaxProtocol {
}
}
-// MARK: - DeclGroupSyntax
-
-public protocol DeclGroupSyntax: SyntaxProtocol {
- var attributes: AttributeListSyntax? {
- get
- set
- }
-
- var modifiers: ModifierListSyntax? {
- get
- set
- }
-
- var members: MemberDeclBlockSyntax {
- get
- set
- }
-}
-
-public extension DeclGroupSyntax {
- /// Without this function, the `with` function defined on `SyntaxProtocol`
- /// does not work on existentials of this protocol type.
- @_disfavoredOverload
- func with(_ keyPath: WritableKeyPath, _ newChild: T) -> DeclGroupSyntax {
- var copy: DeclGroupSyntax = self
- copy[keyPath: keyPath] = newChild
- return copy
- }
-}
-
-public extension SyntaxProtocol {
- /// Check whether the non-type erased version of this syntax node conforms to
- /// `DeclGroupSyntax`.
- /// Note that this will incur an existential conversion.
- func isProtocol(_: DeclGroupSyntax.Protocol) -> Bool {
- return self.asProtocol(DeclGroupSyntax.self) != nil
- }
-
- /// Return the non-type erased version of this syntax node if it conforms to
- /// `DeclGroupSyntax`. Otherwise return `nil`.
- /// Note that this will incur an existential conversion.
- func asProtocol(_: DeclGroupSyntax.Protocol) -> DeclGroupSyntax? {
- return Syntax(self).asProtocol(SyntaxProtocol.self) as? DeclGroupSyntax
- }
-}
-
// MARK: - BracedSyntax
public protocol BracedSyntax: SyntaxProtocol {
@@ -123,21 +91,31 @@ public extension SyntaxProtocol {
}
}
-// MARK: - IdentifiedDeclSyntax
+// MARK: - DeclGroupSyntax
-public protocol IdentifiedDeclSyntax: SyntaxProtocol {
- var identifier: TokenSyntax {
+public protocol DeclGroupSyntax: SyntaxProtocol {
+ var attributes: AttributeListSyntax? {
+ get
+ set
+ }
+
+ var modifiers: ModifierListSyntax? {
+ get
+ set
+ }
+
+ var members: MemberDeclBlockSyntax {
get
set
}
}
-public extension IdentifiedDeclSyntax {
+public extension DeclGroupSyntax {
/// Without this function, the `with` function defined on `SyntaxProtocol`
/// does not work on existentials of this protocol type.
@_disfavoredOverload
- func with(_ keyPath: WritableKeyPath, _ newChild: T) -> IdentifiedDeclSyntax {
- var copy: IdentifiedDeclSyntax = self
+ func with(_ keyPath: WritableKeyPath, _ newChild: T) -> DeclGroupSyntax {
+ var copy: DeclGroupSyntax = self
copy[keyPath: keyPath] = newChild
return copy
}
@@ -145,76 +123,55 @@ public extension IdentifiedDeclSyntax {
public extension SyntaxProtocol {
/// Check whether the non-type erased version of this syntax node conforms to
- /// `IdentifiedDeclSyntax`.
+ /// `DeclGroupSyntax`.
/// Note that this will incur an existential conversion.
- func isProtocol(_: IdentifiedDeclSyntax.Protocol) -> Bool {
- return self.asProtocol(IdentifiedDeclSyntax.self) != nil
+ func isProtocol(_: DeclGroupSyntax.Protocol) -> Bool {
+ return self.asProtocol(DeclGroupSyntax.self) != nil
}
/// Return the non-type erased version of this syntax node if it conforms to
- /// `IdentifiedDeclSyntax`. Otherwise return `nil`.
+ /// `DeclGroupSyntax`. Otherwise return `nil`.
/// Note that this will incur an existential conversion.
- func asProtocol(_: IdentifiedDeclSyntax.Protocol) -> IdentifiedDeclSyntax? {
- return Syntax(self).asProtocol(SyntaxProtocol.self) as? IdentifiedDeclSyntax
+ func asProtocol(_: DeclGroupSyntax.Protocol) -> DeclGroupSyntax? {
+ return Syntax(self).asProtocol(SyntaxProtocol.self) as? DeclGroupSyntax
}
}
-// MARK: - WithCodeBlockSyntax
+// MARK: - EffectSpecifiersSyntax
-public protocol WithCodeBlockSyntax: SyntaxProtocol {
- var body: CodeBlockSyntax {
+public protocol EffectSpecifiersSyntax: SyntaxProtocol {
+ var unexpectedBeforeAsyncSpecifier: UnexpectedNodesSyntax? {
get
set
}
-}
-
-public extension WithCodeBlockSyntax {
- /// Without this function, the `with` function defined on `SyntaxProtocol`
- /// does not work on existentials of this protocol type.
- @_disfavoredOverload
- func with(_ keyPath: WritableKeyPath, _ newChild: T) -> WithCodeBlockSyntax {
- var copy: WithCodeBlockSyntax = self
- copy[keyPath: keyPath] = newChild
- return copy
- }
-}
-
-public extension SyntaxProtocol {
- /// Check whether the non-type erased version of this syntax node conforms to
- /// `WithCodeBlockSyntax`.
- /// Note that this will incur an existential conversion.
- func isProtocol(_: WithCodeBlockSyntax.Protocol) -> Bool {
- return self.asProtocol(WithCodeBlockSyntax.self) != nil
+
+ var asyncSpecifier: TokenSyntax? {
+ get
+ set
}
- /// Return the non-type erased version of this syntax node if it conforms to
- /// `WithCodeBlockSyntax`. Otherwise return `nil`.
- /// Note that this will incur an existential conversion.
- func asProtocol(_: WithCodeBlockSyntax.Protocol) -> WithCodeBlockSyntax? {
- return Syntax(self).asProtocol(SyntaxProtocol.self) as? WithCodeBlockSyntax
+ var unexpectedBetweenAsyncSpecifierAndThrowsSpecifier: UnexpectedNodesSyntax? {
+ get
+ set
}
-}
-
-// MARK: - ParenthesizedSyntax
-
-public protocol ParenthesizedSyntax: SyntaxProtocol {
- var leftParen: TokenSyntax {
+
+ var throwsSpecifier: TokenSyntax? {
get
set
}
- var rightParen: TokenSyntax {
+ var unexpectedAfterThrowsSpecifier: UnexpectedNodesSyntax? {
get
set
}
}
-public extension ParenthesizedSyntax {
+public extension EffectSpecifiersSyntax {
/// Without this function, the `with` function defined on `SyntaxProtocol`
/// does not work on existentials of this protocol type.
@_disfavoredOverload
- func with(_ keyPath: WritableKeyPath, _ newChild: T) -> ParenthesizedSyntax {
- var copy: ParenthesizedSyntax = self
+ func with(_ keyPath: WritableKeyPath, _ newChild: T) -> EffectSpecifiersSyntax {
+ var copy: EffectSpecifiersSyntax = self
copy[keyPath: keyPath] = newChild
return copy
}
@@ -222,17 +179,17 @@ public extension ParenthesizedSyntax {
public extension SyntaxProtocol {
/// Check whether the non-type erased version of this syntax node conforms to
- /// `ParenthesizedSyntax`.
+ /// `EffectSpecifiersSyntax`.
/// Note that this will incur an existential conversion.
- func isProtocol(_: ParenthesizedSyntax.Protocol) -> Bool {
- return self.asProtocol(ParenthesizedSyntax.self) != nil
+ func isProtocol(_: EffectSpecifiersSyntax.Protocol) -> Bool {
+ return self.asProtocol(EffectSpecifiersSyntax.self) != nil
}
/// Return the non-type erased version of this syntax node if it conforms to
- /// `ParenthesizedSyntax`. Otherwise return `nil`.
+ /// `EffectSpecifiersSyntax`. Otherwise return `nil`.
/// Note that this will incur an existential conversion.
- func asProtocol(_: ParenthesizedSyntax.Protocol) -> ParenthesizedSyntax? {
- return Syntax(self).asProtocol(SyntaxProtocol.self) as? ParenthesizedSyntax
+ func asProtocol(_: EffectSpecifiersSyntax.Protocol) -> EffectSpecifiersSyntax? {
+ return Syntax(self).asProtocol(SyntaxProtocol.self) as? EffectSpecifiersSyntax
}
}
@@ -307,21 +264,21 @@ public extension SyntaxProtocol {
}
}
-// MARK: - WithTrailingCommaSyntax
+// MARK: - IdentifiedDeclSyntax
-public protocol WithTrailingCommaSyntax: SyntaxProtocol {
- var trailingComma: TokenSyntax? {
+public protocol IdentifiedDeclSyntax: SyntaxProtocol {
+ var identifier: TokenSyntax {
get
set
}
}
-public extension WithTrailingCommaSyntax {
+public extension IdentifiedDeclSyntax {
/// Without this function, the `with` function defined on `SyntaxProtocol`
/// does not work on existentials of this protocol type.
@_disfavoredOverload
- func with(_ keyPath: WritableKeyPath, _ newChild: T) -> WithTrailingCommaSyntax {
- var copy: WithTrailingCommaSyntax = self
+ func with(_ keyPath: WritableKeyPath, _ newChild: T) -> IdentifiedDeclSyntax {
+ var copy: IdentifiedDeclSyntax = self
copy[keyPath: keyPath] = newChild
return copy
}
@@ -329,17 +286,94 @@ public extension WithTrailingCommaSyntax {
public extension SyntaxProtocol {
/// Check whether the non-type erased version of this syntax node conforms to
- /// `WithTrailingCommaSyntax`.
+ /// `IdentifiedDeclSyntax`.
/// Note that this will incur an existential conversion.
- func isProtocol(_: WithTrailingCommaSyntax.Protocol) -> Bool {
- return self.asProtocol(WithTrailingCommaSyntax.self) != nil
+ func isProtocol(_: IdentifiedDeclSyntax.Protocol) -> Bool {
+ return self.asProtocol(IdentifiedDeclSyntax.self) != nil
}
/// Return the non-type erased version of this syntax node if it conforms to
- /// `WithTrailingCommaSyntax`. Otherwise return `nil`.
+ /// `IdentifiedDeclSyntax`. Otherwise return `nil`.
/// Note that this will incur an existential conversion.
- func asProtocol(_: WithTrailingCommaSyntax.Protocol) -> WithTrailingCommaSyntax? {
- return Syntax(self).asProtocol(SyntaxProtocol.self) as? WithTrailingCommaSyntax
+ func asProtocol(_: IdentifiedDeclSyntax.Protocol) -> IdentifiedDeclSyntax? {
+ return Syntax(self).asProtocol(SyntaxProtocol.self) as? IdentifiedDeclSyntax
+ }
+}
+
+// MARK: - ParenthesizedSyntax
+
+public protocol ParenthesizedSyntax: SyntaxProtocol {
+ var leftParen: TokenSyntax {
+ get
+ set
+ }
+
+ var rightParen: TokenSyntax {
+ get
+ set
+ }
+}
+
+public extension ParenthesizedSyntax {
+ /// Without this function, the `with` function defined on `SyntaxProtocol`
+ /// does not work on existentials of this protocol type.
+ @_disfavoredOverload
+ func with(_ keyPath: WritableKeyPath, _ newChild: T) -> ParenthesizedSyntax {
+ var copy: ParenthesizedSyntax = self
+ copy[keyPath: keyPath] = newChild
+ return copy
+ }
+}
+
+public extension SyntaxProtocol {
+ /// Check whether the non-type erased version of this syntax node conforms to
+ /// `ParenthesizedSyntax`.
+ /// Note that this will incur an existential conversion.
+ func isProtocol(_: ParenthesizedSyntax.Protocol) -> Bool {
+ return self.asProtocol(ParenthesizedSyntax.self) != nil
+ }
+
+ /// Return the non-type erased version of this syntax node if it conforms to
+ /// `ParenthesizedSyntax`. Otherwise return `nil`.
+ /// Note that this will incur an existential conversion.
+ func asProtocol(_: ParenthesizedSyntax.Protocol) -> ParenthesizedSyntax? {
+ return Syntax(self).asProtocol(SyntaxProtocol.self) as? ParenthesizedSyntax
+ }
+}
+
+// MARK: - WithCodeBlockSyntax
+
+public protocol WithCodeBlockSyntax: SyntaxProtocol {
+ var body: CodeBlockSyntax {
+ get
+ set
+ }
+}
+
+public extension WithCodeBlockSyntax {
+ /// Without this function, the `with` function defined on `SyntaxProtocol`
+ /// does not work on existentials of this protocol type.
+ @_disfavoredOverload
+ func with(_ keyPath: WritableKeyPath, _ newChild: T) -> WithCodeBlockSyntax {
+ var copy: WithCodeBlockSyntax = self
+ copy[keyPath: keyPath] = newChild
+ return copy
+ }
+}
+
+public extension SyntaxProtocol {
+ /// Check whether the non-type erased version of this syntax node conforms to
+ /// `WithCodeBlockSyntax`.
+ /// Note that this will incur an existential conversion.
+ func isProtocol(_: WithCodeBlockSyntax.Protocol) -> Bool {
+ return self.asProtocol(WithCodeBlockSyntax.self) != nil
+ }
+
+ /// Return the non-type erased version of this syntax node if it conforms to
+ /// `WithCodeBlockSyntax`. Otherwise return `nil`.
+ /// Note that this will incur an existential conversion.
+ func asProtocol(_: WithCodeBlockSyntax.Protocol) -> WithCodeBlockSyntax? {
+ return Syntax(self).asProtocol(SyntaxProtocol.self) as? WithCodeBlockSyntax
}
}
@@ -379,41 +413,21 @@ public extension SyntaxProtocol {
}
}
-// MARK: - EffectSpecifiersSyntax
+// MARK: - WithTrailingCommaSyntax
-public protocol EffectSpecifiersSyntax: SyntaxProtocol {
- var unexpectedBeforeAsyncSpecifier: UnexpectedNodesSyntax? {
- get
- set
- }
-
- var asyncSpecifier: TokenSyntax? {
- get
- set
- }
-
- var unexpectedBetweenAsyncSpecifierAndThrowsSpecifier: UnexpectedNodesSyntax? {
- get
- set
- }
-
- var throwsSpecifier: TokenSyntax? {
- get
- set
- }
-
- var unexpectedAfterThrowsSpecifier: UnexpectedNodesSyntax? {
+public protocol WithTrailingCommaSyntax: SyntaxProtocol {
+ var trailingComma: TokenSyntax? {
get
set
}
}
-public extension EffectSpecifiersSyntax {
+public extension WithTrailingCommaSyntax {
/// Without this function, the `with` function defined on `SyntaxProtocol`
/// does not work on existentials of this protocol type.
@_disfavoredOverload
- func with(_ keyPath: WritableKeyPath, _ newChild: T) -> EffectSpecifiersSyntax {
- var copy: EffectSpecifiersSyntax = self
+ func with(_ keyPath: WritableKeyPath, _ newChild: T) -> WithTrailingCommaSyntax {
+ var copy: WithTrailingCommaSyntax = self
copy[keyPath: keyPath] = newChild
return copy
}
@@ -421,17 +435,17 @@ public extension EffectSpecifiersSyntax {
public extension SyntaxProtocol {
/// Check whether the non-type erased version of this syntax node conforms to
- /// `EffectSpecifiersSyntax`.
+ /// `WithTrailingCommaSyntax`.
/// Note that this will incur an existential conversion.
- func isProtocol(_: EffectSpecifiersSyntax.Protocol) -> Bool {
- return self.asProtocol(EffectSpecifiersSyntax.self) != nil
+ func isProtocol(_: WithTrailingCommaSyntax.Protocol) -> Bool {
+ return self.asProtocol(WithTrailingCommaSyntax.self) != nil
}
/// Return the non-type erased version of this syntax node if it conforms to
- /// `EffectSpecifiersSyntax`. Otherwise return `nil`.
+ /// `WithTrailingCommaSyntax`. Otherwise return `nil`.
/// Note that this will incur an existential conversion.
- func asProtocol(_: EffectSpecifiersSyntax.Protocol) -> EffectSpecifiersSyntax? {
- return Syntax(self).asProtocol(SyntaxProtocol.self) as? EffectSpecifiersSyntax
+ func asProtocol(_: WithTrailingCommaSyntax.Protocol) -> WithTrailingCommaSyntax? {
+ return Syntax(self).asProtocol(SyntaxProtocol.self) as? WithTrailingCommaSyntax
}
}
diff --git a/Sources/SwiftSyntax/generated/SyntaxTransform.swift b/Sources/SwiftSyntax/generated/SyntaxTransform.swift
index 5d33eddb874..ce4cab52b04 100644
--- a/Sources/SwiftSyntax/generated/SyntaxTransform.swift
+++ b/Sources/SwiftSyntax/generated/SyntaxTransform.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/SyntaxVisitor.swift b/Sources/SwiftSyntax/generated/SyntaxVisitor.swift
index e40352675aa..09b18e12dff 100644
--- a/Sources/SwiftSyntax/generated/SyntaxVisitor.swift
+++ b/Sources/SwiftSyntax/generated/SyntaxVisitor.swift
@@ -1,5 +1,19 @@
+//// Automatically Generated by generate-swiftsyntax
+//// Do Not Edit Directly!
+//===----------------------------------------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
/// The enum describes how the SyntaxVistor should continue after visiting
/// the current node.
public enum SyntaxVisitorContinueKind {
diff --git a/Sources/SwiftSyntax/generated/TokenKind.swift b/Sources/SwiftSyntax/generated/TokenKind.swift
index 77df7505cb8..465a40ec62a 100644
--- a/Sources/SwiftSyntax/generated/TokenKind.swift
+++ b/Sources/SwiftSyntax/generated/TokenKind.swift
@@ -1,67 +1,75 @@
+//// Automatically Generated by generate-swiftsyntax
+//// Do Not Edit Directly!
+//===----------------------------------------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
/// Enumerates the kinds of tokens in the Swift language.
@frozen // FIXME: Not actually stable, works around a miscompile
public enum TokenKind: Hashable {
case eof
- case wildcard
-
- case leftParen
-
- case rightParen
-
- case leftBrace
-
- case rightBrace
+ case arrow
- case leftSquareBracket
+ case atSign
- case rightSquareBracket
+ case backslash
- case leftAngle
+ case backtick
- case rightAngle
+ case binaryOperator(String)
- case period
+ case colon
case comma
+ case dollarIdentifier(String)
+
case ellipsis
- case colon
+ case equal
- case semicolon
+ case exclamationMark
- case equal
+ case floatingLiteral(String)
- case atSign
+ case identifier(String)
- case pound
+ case infixQuestionMark
- case prefixAmpersand
+ case integerLiteral(String)
- case arrow
+ case keyword(Keyword)
- case backtick
+ case leftAngle
- case backslash
+ case leftBrace
- case exclamationMark
+ case leftParen
- case postfixQuestionMark
+ case leftSquareBracket
- case infixQuestionMark
+ case multilineStringQuote
- case stringQuote
+ case period
- case singleQuote
+ case postfixOperator(String)
- case multilineStringQuote
+ case postfixQuestionMark
- case poundSourceLocationKeyword
+ case pound
- case poundIfKeyword
+ case poundAvailableKeyword
case poundElseKeyword
@@ -69,130 +77,136 @@ public enum TokenKind: Hashable {
case poundEndifKeyword
- case poundAvailableKeyword
+ case poundIfKeyword
+
+ case poundSourceLocationKeyword
case poundUnavailableKeyword
- case integerLiteral(String)
+ case prefixAmpersand
- case floatingLiteral(String)
+ case prefixOperator(String)
- case regexLiteral(String)
+ case rawStringDelimiter(String)
- case unknown(String)
+ case regexLiteral(String)
- case identifier(String)
+ case rightAngle
- case binaryOperator(String)
+ case rightBrace
- case postfixOperator(String)
+ case rightParen
- case prefixOperator(String)
+ case rightSquareBracket
- case dollarIdentifier(String)
+ case semicolon
- case keyword(Keyword)
+ case singleQuote
- case rawStringDelimiter(String)
+ case stringQuote
case stringSegment(String)
+ case unknown(String)
+
+ case wildcard
+
/// The textual representation of this token kind.
@_spi(Testing)
public var text: String {
switch self {
- case .wildcard:
- return #"_"#
- case .leftParen:
- return #"("#
- case .rightParen:
- return #")"#
- case .leftBrace:
- return #"{"#
- case .rightBrace:
- return #"}"#
- case .leftSquareBracket:
- return #"["#
- case .rightSquareBracket:
- return #"]"#
- case .leftAngle:
- return #"<"#
- case .rightAngle:
- return #">"#
- case .period:
- return #"."#
+ case .arrow:
+ return #"->"#
+ case .atSign:
+ return #"@"#
+ case .backslash:
+ return #"\"#
+ case .backtick:
+ return #"`"#
+ case .binaryOperator(let text):
+ return text
+ case .colon:
+ return #":"#
case .comma:
return #","#
+ case .dollarIdentifier(let text):
+ return text
case .ellipsis:
return #"..."#
- case .colon:
- return #":"#
- case .semicolon:
- return #";"#
case .equal:
return #"="#
- case .atSign:
- return #"@"#
- case .pound:
- return #"#"#
- case .prefixAmpersand:
- return #"&"#
- case .arrow:
- return #"->"#
- case .backtick:
- return #"`"#
- case .backslash:
- return #"\"#
case .exclamationMark:
return #"!"#
- case .postfixQuestionMark:
- return #"?"#
+ case .floatingLiteral(let text):
+ return text
+ case .identifier(let text):
+ return text
case .infixQuestionMark:
return #"?"#
- case .stringQuote:
- return #"""#
- case .singleQuote:
- return #"'"#
+ case .integerLiteral(let text):
+ return text
+ case .keyword(let assoc):
+ return String(syntaxText: assoc.defaultText)
+ case .leftAngle:
+ return #"<"#
+ case .leftBrace:
+ return #"{"#
+ case .leftParen:
+ return #"("#
+ case .leftSquareBracket:
+ return #"["#
case .multilineStringQuote:
return #"""""#
- case .poundSourceLocationKeyword:
- return #"#sourceLocation"#
- case .poundIfKeyword:
- return #"#if"#
+ case .period:
+ return #"."#
+ case .postfixOperator(let text):
+ return text
+ case .postfixQuestionMark:
+ return #"?"#
+ case .pound:
+ return #"#"#
+ case .poundAvailableKeyword:
+ return #"#available"#
case .poundElseKeyword:
return #"#else"#
case .poundElseifKeyword:
return #"#elseif"#
case .poundEndifKeyword:
return #"#endif"#
- case .poundAvailableKeyword:
- return #"#available"#
+ case .poundIfKeyword:
+ return #"#if"#
+ case .poundSourceLocationKeyword:
+ return #"#sourceLocation"#
case .poundUnavailableKeyword:
return #"#unavailable"#
- case .integerLiteral(let text):
- return text
- case .floatingLiteral(let text):
- return text
- case .regexLiteral(let text):
- return text
- case .unknown(let text):
- return text
- case .identifier(let text):
- return text
- case .binaryOperator(let text):
- return text
- case .postfixOperator(let text):
- return text
+ case .prefixAmpersand:
+ return #"&"#
case .prefixOperator(let text):
return text
- case .dollarIdentifier(let text):
- return text
- case .keyword(let assoc):
- return String(syntaxText: assoc.defaultText)
case .rawStringDelimiter(let text):
return text
+ case .regexLiteral(let text):
+ return text
+ case .rightAngle:
+ return #">"#
+ case .rightBrace:
+ return #"}"#
+ case .rightParen:
+ return #")"#
+ case .rightSquareBracket:
+ return #"]"#
+ case .semicolon:
+ return #";"#
+ case .singleQuote:
+ return #"'"#
+ case .stringQuote:
+ return #"""#
case .stringSegment(let text):
return text
+ case .unknown(let text):
+ return text
+ case .wildcard:
+ return #"_"#
case .eof:
return ""
}
@@ -202,76 +216,76 @@ public enum TokenKind: Hashable {
@_spi(RawSyntax)
public var defaultText: SyntaxText? {
switch self {
- case .wildcard:
- return #"_"#
- case .leftParen:
- return #"("#
- case .rightParen:
- return #")"#
- case .leftBrace:
- return #"{"#
- case .rightBrace:
- return #"}"#
- case .leftSquareBracket:
- return #"["#
- case .rightSquareBracket:
- return #"]"#
- case .leftAngle:
- return #"<"#
- case .rightAngle:
- return #">"#
- case .period:
- return #"."#
+ case .arrow:
+ return #"->"#
+ case .atSign:
+ return #"@"#
+ case .backslash:
+ return #"\"#
+ case .backtick:
+ return #"`"#
+ case .colon:
+ return #":"#
case .comma:
return #","#
case .ellipsis:
return #"..."#
- case .colon:
- return #":"#
- case .semicolon:
- return #";"#
case .equal:
return #"="#
- case .atSign:
- return #"@"#
- case .pound:
- return #"#"#
- case .prefixAmpersand:
- return #"&"#
- case .arrow:
- return #"->"#
- case .backtick:
- return #"`"#
- case .backslash:
- return #"\"#
case .exclamationMark:
return #"!"#
- case .postfixQuestionMark:
- return #"?"#
case .infixQuestionMark:
return #"?"#
- case .stringQuote:
- return #"""#
- case .singleQuote:
- return #"'"#
+ case .keyword(let assoc):
+ return assoc.defaultText
+ case .leftAngle:
+ return #"<"#
+ case .leftBrace:
+ return #"{"#
+ case .leftParen:
+ return #"("#
+ case .leftSquareBracket:
+ return #"["#
case .multilineStringQuote:
return #"""""#
- case .poundSourceLocationKeyword:
- return #"#sourceLocation"#
- case .poundIfKeyword:
- return #"#if"#
+ case .period:
+ return #"."#
+ case .postfixQuestionMark:
+ return #"?"#
+ case .pound:
+ return #"#"#
+ case .poundAvailableKeyword:
+ return #"#available"#
case .poundElseKeyword:
return #"#else"#
case .poundElseifKeyword:
return #"#elseif"#
case .poundEndifKeyword:
return #"#endif"#
- case .poundAvailableKeyword:
- return #"#available"#
+ case .poundIfKeyword:
+ return #"#if"#
+ case .poundSourceLocationKeyword:
+ return #"#sourceLocation"#
case .poundUnavailableKeyword:
return #"#unavailable"#
- case .keyword(let assoc):
- return assoc.defaultText
+ case .prefixAmpersand:
+ return #"&"#
+ case .rightAngle:
+ return #">"#
+ case .rightBrace:
+ return #"}"#
+ case .rightParen:
+ return #")"#
+ case .rightSquareBracket:
+ return #"]"#
+ case .semicolon:
+ return #";"#
+ case .singleQuote:
+ return #"'"#
+ case .stringQuote:
+ return #"""#
+ case .wildcard:
+ return #"_"#
case .eof:
return ""
default:
@@ -283,96 +297,96 @@ public enum TokenKind: Hashable {
switch self {
case .eof:
return "end of file"
- case .wildcard:
- return #"wildcard"#
- case .leftParen:
- return #"("#
- case .rightParen:
- return #")"#
- case .leftBrace:
- return #"{"#
- case .rightBrace:
- return #"}"#
- case .leftSquareBracket:
- return #"["#
- case .rightSquareBracket:
- return #"]"#
- case .leftAngle:
- return #"<"#
- case .rightAngle:
- return #">"#
- case .period:
- return #"."#
+ case .arrow:
+ return #"->"#
+ case .atSign:
+ return #"@"#
+ case .backslash:
+ return #"\"#
+ case .backtick:
+ return #"`"#
+ case .binaryOperator:
+ return #"binary operator"#
+ case .colon:
+ return #":"#
case .comma:
return #","#
+ case .dollarIdentifier:
+ return #"dollar identifier"#
case .ellipsis:
return #"..."#
- case .colon:
- return #":"#
- case .semicolon:
- return #";"#
case .equal:
return #"="#
- case .atSign:
- return #"@"#
- case .pound:
- return #"#"#
- case .prefixAmpersand:
- return #"&"#
- case .arrow:
- return #"->"#
- case .backtick:
- return #"`"#
- case .backslash:
- return #"\"#
case .exclamationMark:
return #"!"#
- case .postfixQuestionMark:
- return #"?"#
+ case .floatingLiteral:
+ return #"floating literal"#
+ case .identifier:
+ return #"identifier"#
case .infixQuestionMark:
return #"?"#
- case .stringQuote:
- return #"""#
- case .singleQuote:
- return #"'"#
+ case .integerLiteral:
+ return #"integer literal"#
+ case .leftAngle:
+ return #"<"#
+ case .leftBrace:
+ return #"{"#
+ case .leftParen:
+ return #"("#
+ case .leftSquareBracket:
+ return #"["#
case .multilineStringQuote:
return #"""""#
- case .poundSourceLocationKeyword:
- return #"#sourceLocation"#
- case .poundIfKeyword:
- return #"#if"#
+ case .period:
+ return #"."#
+ case .postfixOperator:
+ return #"postfix operator"#
+ case .postfixQuestionMark:
+ return #"?"#
+ case .pound:
+ return #"#"#
+ case .poundAvailableKeyword:
+ return #"#available"#
case .poundElseKeyword:
return #"#else"#
case .poundElseifKeyword:
return #"#elseif"#
case .poundEndifKeyword:
return #"#endif"#
- case .poundAvailableKeyword:
- return #"#available"#
+ case .poundIfKeyword:
+ return #"#if"#
+ case .poundSourceLocationKeyword:
+ return #"#sourceLocation"#
case .poundUnavailableKeyword:
return #"#unavailable"#
- case .integerLiteral:
- return #"integer literal"#
- case .floatingLiteral:
- return #"floating literal"#
- case .regexLiteral:
- return #"regex literal"#
- case .unknown:
- return #"token"#
- case .identifier:
- return #"identifier"#
- case .binaryOperator:
- return #"binary operator"#
- case .postfixOperator:
- return #"postfix operator"#
+ case .prefixAmpersand:
+ return #"&"#
case .prefixOperator:
return #"prefix operator"#
- case .dollarIdentifier:
- return #"dollar identifier"#
case .rawStringDelimiter:
return #"raw string delimiter"#
+ case .regexLiteral:
+ return #"regex literal"#
+ case .rightAngle:
+ return #">"#
+ case .rightBrace:
+ return #"}"#
+ case .rightParen:
+ return #")"#
+ case .rightSquareBracket:
+ return #"]"#
+ case .semicolon:
+ return #";"#
+ case .singleQuote:
+ return #"'"#
+ case .stringQuote:
+ return #"""#
case .stringSegment:
return #"string segment"#
+ case .unknown:
+ return #"token"#
+ case .wildcard:
+ return #"wildcard"#
case .keyword(let keyword):
return String(syntaxText: keyword.defaultText)
}
@@ -387,63 +401,55 @@ public enum TokenKind: Hashable {
switch self {
case .eof:
return false
- case .wildcard:
- return false
- case .leftParen:
- return false
- case .rightParen:
- return false
- case .leftBrace:
- return false
- case .rightBrace:
+ case .arrow:
return false
- case .leftSquareBracket:
+ case .atSign:
return false
- case .rightSquareBracket:
+ case .backslash:
return false
- case .leftAngle:
+ case .backtick:
return false
- case .rightAngle:
+ case .binaryOperator:
return false
- case .period:
+ case .colon:
return false
case .comma:
return false
+ case .dollarIdentifier:
+ return false
case .ellipsis:
return false
- case .colon:
+ case .equal:
return false
- case .semicolon:
+ case .exclamationMark:
return false
- case .equal:
+ case .floatingLiteral:
return false
- case .atSign:
+ case .identifier:
return false
- case .pound:
+ case .infixQuestionMark:
return false
- case .prefixAmpersand:
+ case .integerLiteral:
return false
- case .arrow:
+ case .leftAngle:
return false
- case .backtick:
+ case .leftBrace:
return false
- case .backslash:
+ case .leftParen:
return false
- case .exclamationMark:
+ case .leftSquareBracket:
return false
- case .postfixQuestionMark:
+ case .multilineStringQuote:
return false
- case .infixQuestionMark:
+ case .period:
return false
- case .stringQuote:
+ case .postfixOperator:
return false
- case .singleQuote:
+ case .postfixQuestionMark:
return false
- case .multilineStringQuote:
+ case .pound:
return false
- case .poundSourceLocationKeyword:
- return true
- case .poundIfKeyword:
+ case .poundAvailableKeyword:
return true
case .poundElseKeyword:
return true
@@ -451,32 +457,40 @@ public enum TokenKind: Hashable {
return true
case .poundEndifKeyword:
return true
- case .poundAvailableKeyword:
+ case .poundIfKeyword:
+ return true
+ case .poundSourceLocationKeyword:
return true
case .poundUnavailableKeyword:
return true
- case .integerLiteral:
+ case .prefixAmpersand:
return false
- case .floatingLiteral:
+ case .prefixOperator:
return false
- case .regexLiteral:
+ case .rawStringDelimiter:
return false
- case .unknown:
+ case .regexLiteral:
return false
- case .identifier:
+ case .rightAngle:
return false
- case .binaryOperator:
+ case .rightBrace:
return false
- case .postfixOperator:
+ case .rightParen:
return false
- case .prefixOperator:
+ case .rightSquareBracket:
return false
- case .dollarIdentifier:
+ case .semicolon:
return false
- case .rawStringDelimiter:
+ case .singleQuote:
+ return false
+ case .stringQuote:
return false
case .stringSegment:
return false
+ case .unknown:
+ return false
+ case .wildcard:
+ return false
case .keyword(let keyword):
return keyword.isLexerClassified
}
@@ -491,63 +505,57 @@ public enum TokenKind: Hashable {
switch self {
case .eof:
return false
- case .wildcard:
- return false
- case .leftParen:
- return true
- case .rightParen:
- return true
- case .leftBrace:
- return true
- case .rightBrace:
- return true
- case .leftSquareBracket:
+ case .arrow:
return true
- case .rightSquareBracket:
+ case .atSign:
return true
- case .leftAngle:
+ case .backslash:
return true
- case .rightAngle:
+ case .backtick:
return true
- case .period:
+ case .binaryOperator:
+ return false
+ case .colon:
return true
case .comma:
return true
+ case .dollarIdentifier:
+ return false
case .ellipsis:
return true
- case .colon:
- return true
- case .semicolon:
- return true
case .equal:
return true
- case .atSign:
- return true
- case .pound:
- return true
- case .prefixAmpersand:
+ case .exclamationMark:
return true
- case .arrow:
+ case .floatingLiteral:
+ return false
+ case .identifier:
+ return false
+ case .infixQuestionMark:
return true
- case .backtick:
+ case .integerLiteral:
+ return false
+ case .keyword:
+ return false
+ case .leftAngle:
return true
- case .backslash:
+ case .leftBrace:
return true
- case .exclamationMark:
+ case .leftParen:
return true
- case .postfixQuestionMark:
+ case .leftSquareBracket:
return true
- case .infixQuestionMark:
+ case .multilineStringQuote:
return true
- case .stringQuote:
+ case .period:
return true
- case .singleQuote:
+ case .postfixOperator:
+ return false
+ case .postfixQuestionMark:
return true
- case .multilineStringQuote:
+ case .pound:
return true
- case .poundSourceLocationKeyword:
- return false
- case .poundIfKeyword:
+ case .poundAvailableKeyword:
return false
case .poundElseKeyword:
return false
@@ -555,33 +563,39 @@ public enum TokenKind: Hashable {
return false
case .poundEndifKeyword:
return false
- case .poundAvailableKeyword:
+ case .poundIfKeyword:
+ return false
+ case .poundSourceLocationKeyword:
return false
case .poundUnavailableKeyword:
return false
- case .integerLiteral:
+ case .prefixAmpersand:
+ return true
+ case .prefixOperator:
return false
- case .floatingLiteral:
+ case .rawStringDelimiter:
return false
case .regexLiteral:
return false
- case .unknown:
- return false
- case .identifier:
- return false
- case .binaryOperator:
- return false
- case .postfixOperator:
- return false
- case .prefixOperator:
- return false
- case .dollarIdentifier:
- return false
- case .keyword:
+ case .rightAngle:
+ return true
+ case .rightBrace:
+ return true
+ case .rightParen:
+ return true
+ case .rightSquareBracket:
+ return true
+ case .semicolon:
+ return true
+ case .singleQuote:
+ return true
+ case .stringQuote:
+ return true
+ case .stringSegment:
return false
- case .rawStringDelimiter:
+ case .unknown:
return false
- case .stringSegment:
+ case .wildcard:
return false
}
}
@@ -592,63 +606,57 @@ extension TokenKind: Equatable {
switch (lhs, rhs) {
case (.eof, .eof):
return true
- case (.wildcard, .wildcard):
- return true
- case (.leftParen, .leftParen):
- return true
- case (.rightParen, .rightParen):
- return true
- case (.leftBrace, .leftBrace):
- return true
- case (.rightBrace, .rightBrace):
- return true
- case (.leftSquareBracket, .leftSquareBracket):
+ case (.arrow, .arrow):
return true
- case (.rightSquareBracket, .rightSquareBracket):
+ case (.atSign, .atSign):
return true
- case (.leftAngle, .leftAngle):
+ case (.backslash, .backslash):
return true
- case (.rightAngle, .rightAngle):
+ case (.backtick, .backtick):
return true
- case (.period, .period):
+ case (.binaryOperator(let lhsText), .binaryOperator(let rhsText)):
+ return lhsText == rhsText
+ case (.colon, .colon):
return true
case (.comma, .comma):
return true
+ case (.dollarIdentifier(let lhsText), .dollarIdentifier(let rhsText)):
+ return lhsText == rhsText
case (.ellipsis, .ellipsis):
return true
- case (.colon, .colon):
- return true
- case (.semicolon, .semicolon):
- return true
case (.equal, .equal):
return true
- case (.atSign, .atSign):
- return true
- case (.pound, .pound):
- return true
- case (.prefixAmpersand, .prefixAmpersand):
- return true
- case (.arrow, .arrow):
+ case (.exclamationMark, .exclamationMark):
return true
- case (.backtick, .backtick):
+ case (.floatingLiteral(let lhsText), .floatingLiteral(let rhsText)):
+ return lhsText == rhsText
+ case (.identifier(let lhsText), .identifier(let rhsText)):
+ return lhsText == rhsText
+ case (.infixQuestionMark, .infixQuestionMark):
return true
- case (.backslash, .backslash):
+ case (.integerLiteral(let lhsText), .integerLiteral(let rhsText)):
+ return lhsText == rhsText
+ case (.keyword(let lhsText), .keyword(let rhsText)):
+ return lhsText == rhsText
+ case (.leftAngle, .leftAngle):
return true
- case (.exclamationMark, .exclamationMark):
+ case (.leftBrace, .leftBrace):
return true
- case (.postfixQuestionMark, .postfixQuestionMark):
+ case (.leftParen, .leftParen):
return true
- case (.infixQuestionMark, .infixQuestionMark):
+ case (.leftSquareBracket, .leftSquareBracket):
return true
- case (.stringQuote, .stringQuote):
+ case (.multilineStringQuote, .multilineStringQuote):
return true
- case (.singleQuote, .singleQuote):
+ case (.period, .period):
return true
- case (.multilineStringQuote, .multilineStringQuote):
+ case (.postfixOperator(let lhsText), .postfixOperator(let rhsText)):
+ return lhsText == rhsText
+ case (.postfixQuestionMark, .postfixQuestionMark):
return true
- case (.poundSourceLocationKeyword, .poundSourceLocationKeyword):
+ case (.pound, .pound):
return true
- case (.poundIfKeyword, .poundIfKeyword):
+ case (.poundAvailableKeyword, .poundAvailableKeyword):
return true
case (.poundElseKeyword, .poundElseKeyword):
return true
@@ -656,34 +664,40 @@ extension TokenKind: Equatable {
return true
case (.poundEndifKeyword, .poundEndifKeyword):
return true
- case (.poundAvailableKeyword, .poundAvailableKeyword):
+ case (.poundIfKeyword, .poundIfKeyword):
+ return true
+ case (.poundSourceLocationKeyword, .poundSourceLocationKeyword):
return true
case (.poundUnavailableKeyword, .poundUnavailableKeyword):
return true
- case (.integerLiteral(let lhsText), .integerLiteral(let rhsText)):
- return lhsText == rhsText
- case (.floatingLiteral(let lhsText), .floatingLiteral(let rhsText)):
- return lhsText == rhsText
- case (.regexLiteral(let lhsText), .regexLiteral(let rhsText)):
- return lhsText == rhsText
- case (.unknown(let lhsText), .unknown(let rhsText)):
- return lhsText == rhsText
- case (.identifier(let lhsText), .identifier(let rhsText)):
- return lhsText == rhsText
- case (.binaryOperator(let lhsText), .binaryOperator(let rhsText)):
- return lhsText == rhsText
- case (.postfixOperator(let lhsText), .postfixOperator(let rhsText)):
- return lhsText == rhsText
+ case (.prefixAmpersand, .prefixAmpersand):
+ return true
case (.prefixOperator(let lhsText), .prefixOperator(let rhsText)):
return lhsText == rhsText
- case (.dollarIdentifier(let lhsText), .dollarIdentifier(let rhsText)):
- return lhsText == rhsText
- case (.keyword(let lhsText), .keyword(let rhsText)):
- return lhsText == rhsText
case (.rawStringDelimiter(let lhsText), .rawStringDelimiter(let rhsText)):
return lhsText == rhsText
+ case (.regexLiteral(let lhsText), .regexLiteral(let rhsText)):
+ return lhsText == rhsText
+ case (.rightAngle, .rightAngle):
+ return true
+ case (.rightBrace, .rightBrace):
+ return true
+ case (.rightParen, .rightParen):
+ return true
+ case (.rightSquareBracket, .rightSquareBracket):
+ return true
+ case (.semicolon, .semicolon):
+ return true
+ case (.singleQuote, .singleQuote):
+ return true
+ case (.stringQuote, .stringQuote):
+ return true
case (.stringSegment(let lhsText), .stringSegment(let rhsText)):
return lhsText == rhsText
+ case (.unknown(let lhsText), .unknown(let rhsText)):
+ return lhsText == rhsText
+ case (.wildcard, .wildcard):
+ return true
default:
return false
}
@@ -698,63 +712,57 @@ extension TokenKind: Equatable {
public enum RawTokenKind: UInt8, Equatable, Hashable {
case eof
- case wildcard
+ case arrow
- case leftParen
+ case atSign
- case rightParen
+ case backslash
- case leftBrace
+ case backtick
- case rightBrace
+ case binaryOperator
- case leftSquareBracket
+ case colon
- case rightSquareBracket
+ case comma
- case leftAngle
-
- case rightAngle
-
- case period
-
- case comma
+ case dollarIdentifier
case ellipsis
- case colon
+ case equal
- case semicolon
+ case exclamationMark
- case equal
+ case floatingLiteral
- case atSign
+ case identifier
- case pound
+ case infixQuestionMark
- case prefixAmpersand
+ case integerLiteral
- case arrow
+ case keyword
- case backtick
+ case leftAngle
- case backslash
+ case leftBrace
- case exclamationMark
+ case leftParen
- case postfixQuestionMark
+ case leftSquareBracket
- case infixQuestionMark
+ case multilineStringQuote
- case stringQuote
+ case period
- case singleQuote
+ case postfixOperator
- case multilineStringQuote
+ case postfixQuestionMark
- case poundSourceLocationKeyword
+ case pound
- case poundIfKeyword
+ case poundAvailableKeyword
case poundElseKeyword
@@ -762,107 +770,113 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
case poundEndifKeyword
- case poundAvailableKeyword
+ case poundIfKeyword
+
+ case poundSourceLocationKeyword
case poundUnavailableKeyword
- case integerLiteral
+ case prefixAmpersand
- case floatingLiteral
+ case prefixOperator
- case regexLiteral
+ case rawStringDelimiter
- case unknown
+ case regexLiteral
- case identifier
+ case rightAngle
- case binaryOperator
+ case rightBrace
- case postfixOperator
+ case rightParen
- case prefixOperator
+ case rightSquareBracket
- case dollarIdentifier
+ case semicolon
- case keyword
+ case singleQuote
- case rawStringDelimiter
+ case stringQuote
case stringSegment
+ case unknown
+
+ case wildcard
+
@_spi(RawSyntax)
public var defaultText: SyntaxText? {
switch self {
case .eof:
return ""
- case .wildcard:
- return #"_"#
- case .leftParen:
- return #"("#
- case .rightParen:
- return #")"#
- case .leftBrace:
- return #"{"#
- case .rightBrace:
- return #"}"#
- case .leftSquareBracket:
- return #"["#
- case .rightSquareBracket:
- return #"]"#
- case .leftAngle:
- return #"<"#
- case .rightAngle:
- return #">"#
- case .period:
- return #"."#
+ case .arrow:
+ return #"->"#
+ case .atSign:
+ return #"@"#
+ case .backslash:
+ return #"\"#
+ case .backtick:
+ return #"`"#
+ case .colon:
+ return #":"#
case .comma:
return #","#
case .ellipsis:
return #"..."#
- case .colon:
- return #":"#
- case .semicolon:
- return #";"#
case .equal:
return #"="#
- case .atSign:
- return #"@"#
- case .pound:
- return #"#"#
- case .prefixAmpersand:
- return #"&"#
- case .arrow:
- return #"->"#
- case .backtick:
- return #"`"#
- case .backslash:
- return #"\"#
case .exclamationMark:
return #"!"#
- case .postfixQuestionMark:
- return #"?"#
case .infixQuestionMark:
return #"?"#
- case .stringQuote:
- return #"""#
- case .singleQuote:
- return #"'"#
+ case .leftAngle:
+ return #"<"#
+ case .leftBrace:
+ return #"{"#
+ case .leftParen:
+ return #"("#
+ case .leftSquareBracket:
+ return #"["#
case .multilineStringQuote:
return #"""""#
- case .poundSourceLocationKeyword:
- return #"#sourceLocation"#
- case .poundIfKeyword:
- return #"#if"#
+ case .period:
+ return #"."#
+ case .postfixQuestionMark:
+ return #"?"#
+ case .pound:
+ return #"#"#
+ case .poundAvailableKeyword:
+ return #"#available"#
case .poundElseKeyword:
return #"#else"#
case .poundElseifKeyword:
return #"#elseif"#
case .poundEndifKeyword:
return #"#endif"#
- case .poundAvailableKeyword:
- return #"#available"#
+ case .poundIfKeyword:
+ return #"#if"#
+ case .poundSourceLocationKeyword:
+ return #"#sourceLocation"#
case .poundUnavailableKeyword:
return #"#unavailable"#
+ case .prefixAmpersand:
+ return #"&"#
+ case .rightAngle:
+ return #">"#
+ case .rightBrace:
+ return #"}"#
+ case .rightParen:
+ return #")"#
+ case .rightSquareBracket:
+ return #"]"#
+ case .semicolon:
+ return #";"#
+ case .singleQuote:
+ return #"'"#
+ case .stringQuote:
+ return #"""#
+ case .wildcard:
+ return #"_"#
default:
return nil
}
@@ -877,63 +891,57 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
switch self {
case .eof:
return false
- case .wildcard:
- return false
- case .leftParen:
- return true
- case .rightParen:
- return true
- case .leftBrace:
- return true
- case .rightBrace:
- return true
- case .leftSquareBracket:
+ case .arrow:
return true
- case .rightSquareBracket:
+ case .atSign:
return true
- case .leftAngle:
+ case .backslash:
return true
- case .rightAngle:
+ case .backtick:
return true
- case .period:
+ case .binaryOperator:
+ return false
+ case .colon:
return true
case .comma:
return true
+ case .dollarIdentifier:
+ return false
case .ellipsis:
return true
- case .colon:
- return true
- case .semicolon:
- return true
case .equal:
return true
- case .atSign:
- return true
- case .pound:
- return true
- case .prefixAmpersand:
+ case .exclamationMark:
return true
- case .arrow:
+ case .floatingLiteral:
+ return false
+ case .identifier:
+ return false
+ case .infixQuestionMark:
return true
- case .backtick:
+ case .integerLiteral:
+ return false
+ case .keyword:
+ return false
+ case .leftAngle:
return true
- case .backslash:
+ case .leftBrace:
return true
- case .exclamationMark:
+ case .leftParen:
return true
- case .postfixQuestionMark:
+ case .leftSquareBracket:
return true
- case .infixQuestionMark:
+ case .multilineStringQuote:
return true
- case .stringQuote:
+ case .period:
return true
- case .singleQuote:
+ case .postfixOperator:
+ return false
+ case .postfixQuestionMark:
return true
- case .multilineStringQuote:
+ case .pound:
return true
- case .poundSourceLocationKeyword:
- return false
- case .poundIfKeyword:
+ case .poundAvailableKeyword:
return false
case .poundElseKeyword:
return false
@@ -941,33 +949,39 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
return false
case .poundEndifKeyword:
return false
- case .poundAvailableKeyword:
- return false
- case .poundUnavailableKeyword:
- return false
- case .integerLiteral:
- return false
- case .floatingLiteral:
- return false
- case .regexLiteral:
- return false
- case .unknown:
- return false
- case .identifier:
+ case .poundIfKeyword:
return false
- case .binaryOperator:
+ case .poundSourceLocationKeyword:
return false
- case .postfixOperator:
+ case .poundUnavailableKeyword:
return false
+ case .prefixAmpersand:
+ return true
case .prefixOperator:
return false
- case .dollarIdentifier:
- return false
- case .keyword:
- return false
case .rawStringDelimiter:
return false
- case .stringSegment:
+ case .regexLiteral:
+ return false
+ case .rightAngle:
+ return true
+ case .rightBrace:
+ return true
+ case .rightParen:
+ return true
+ case .rightSquareBracket:
+ return true
+ case .semicolon:
+ return true
+ case .singleQuote:
+ return true
+ case .stringQuote:
+ return true
+ case .stringSegment:
+ return false
+ case .unknown:
+ return false
+ case .wildcard:
return false
}
}
@@ -980,93 +994,80 @@ extension TokenKind {
switch rawKind {
case .eof:
return .eof
- case .wildcard:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .wildcard
- case .leftParen:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .leftParen
- case .rightParen:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .rightParen
- case .leftBrace:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .leftBrace
- case .rightBrace:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .rightBrace
- case .leftSquareBracket:
+ case .arrow:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .leftSquareBracket
- case .rightSquareBracket:
+ return .arrow
+ case .atSign:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .rightSquareBracket
- case .leftAngle:
+ return .atSign
+ case .backslash:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .leftAngle
- case .rightAngle:
+ return .backslash
+ case .backtick:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .rightAngle
- case .period:
+ return .backtick
+ case .binaryOperator:
+ return .binaryOperator(text)
+ case .colon:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .period
+ return .colon
case .comma:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
return .comma
+ case .dollarIdentifier:
+ return .dollarIdentifier(text)
case .ellipsis:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
return .ellipsis
- case .colon:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .colon
- case .semicolon:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .semicolon
case .equal:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
return .equal
- case .atSign:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .atSign
- case .pound:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .pound
- case .prefixAmpersand:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .prefixAmpersand
- case .arrow:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .arrow
- case .backtick:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .backtick
- case .backslash:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .backslash
case .exclamationMark:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
return .exclamationMark
- case .postfixQuestionMark:
- assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .postfixQuestionMark
+ case .floatingLiteral:
+ return .floatingLiteral(text)
+ case .identifier:
+ return .identifier(text)
case .infixQuestionMark:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
return .infixQuestionMark
- case .stringQuote:
+ case .integerLiteral:
+ return .integerLiteral(text)
+ case .keyword:
+ var text = text
+ return text.withSyntaxText { text in
+ return .keyword(Keyword(text)!)
+ }
+ case .leftAngle:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .stringQuote
- case .singleQuote:
+ return .leftAngle
+ case .leftBrace:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .singleQuote
+ return .leftBrace
+ case .leftParen:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .leftParen
+ case .leftSquareBracket:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .leftSquareBracket
case .multilineStringQuote:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
return .multilineStringQuote
- case .poundSourceLocationKeyword:
+ case .period:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .poundSourceLocationKeyword
- case .poundIfKeyword:
+ return .period
+ case .postfixOperator:
+ return .postfixOperator(text)
+ case .postfixQuestionMark:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .poundIfKeyword
+ return .postfixQuestionMark
+ case .pound:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .pound
+ case .poundAvailableKeyword:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .poundAvailableKeyword
case .poundElseKeyword:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
return .poundElseKeyword
@@ -1076,39 +1077,52 @@ extension TokenKind {
case .poundEndifKeyword:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
return .poundEndifKeyword
- case .poundAvailableKeyword:
+ case .poundIfKeyword:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
- return .poundAvailableKeyword
+ return .poundIfKeyword
+ case .poundSourceLocationKeyword:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .poundSourceLocationKeyword
case .poundUnavailableKeyword:
assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
return .poundUnavailableKeyword
- case .integerLiteral:
- return .integerLiteral(text)
- case .floatingLiteral:
- return .floatingLiteral(text)
- case .regexLiteral:
- return .regexLiteral(text)
- case .unknown:
- return .unknown(text)
- case .identifier:
- return .identifier(text)
- case .binaryOperator:
- return .binaryOperator(text)
- case .postfixOperator:
- return .postfixOperator(text)
+ case .prefixAmpersand:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .prefixAmpersand
case .prefixOperator:
return .prefixOperator(text)
- case .dollarIdentifier:
- return .dollarIdentifier(text)
- case .keyword:
- var text = text
- return text.withSyntaxText { text in
- return .keyword(Keyword(text)!)
- }
case .rawStringDelimiter:
return .rawStringDelimiter(text)
+ case .regexLiteral:
+ return .regexLiteral(text)
+ case .rightAngle:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .rightAngle
+ case .rightBrace:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .rightBrace
+ case .rightParen:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .rightParen
+ case .rightSquareBracket:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .rightSquareBracket
+ case .semicolon:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .semicolon
+ case .singleQuote:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .singleQuote
+ case .stringQuote:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .stringQuote
case .stringSegment:
return .stringSegment(text)
+ case .unknown:
+ return .unknown(text)
+ case .wildcard:
+ assert(text.isEmpty || rawKind.defaultText.map(String.init) == text)
+ return .wildcard
}
}
@@ -1119,98 +1133,98 @@ extension TokenKind {
switch self {
case .eof:
return (.eof, nil)
- case .wildcard:
- return (.wildcard, nil)
- case .leftParen:
- return (.leftParen, nil)
- case .rightParen:
- return (.rightParen, nil)
- case .leftBrace:
- return (.leftBrace, nil)
- case .rightBrace:
- return (.rightBrace, nil)
- case .leftSquareBracket:
- return (.leftSquareBracket, nil)
- case .rightSquareBracket:
- return (.rightSquareBracket, nil)
- case .leftAngle:
- return (.leftAngle, nil)
- case .rightAngle:
- return (.rightAngle, nil)
- case .period:
- return (.period, nil)
+ case .arrow:
+ return (.arrow, nil)
+ case .atSign:
+ return (.atSign, nil)
+ case .backslash:
+ return (.backslash, nil)
+ case .backtick:
+ return (.backtick, nil)
+ case .binaryOperator(let str):
+ return (.binaryOperator, str)
+ case .colon:
+ return (.colon, nil)
case .comma:
return (.comma, nil)
+ case .dollarIdentifier(let str):
+ return (.dollarIdentifier, str)
case .ellipsis:
return (.ellipsis, nil)
- case .colon:
- return (.colon, nil)
- case .semicolon:
- return (.semicolon, nil)
case .equal:
return (.equal, nil)
- case .atSign:
- return (.atSign, nil)
- case .pound:
- return (.pound, nil)
- case .prefixAmpersand:
- return (.prefixAmpersand, nil)
- case .arrow:
- return (.arrow, nil)
- case .backtick:
- return (.backtick, nil)
- case .backslash:
- return (.backslash, nil)
case .exclamationMark:
return (.exclamationMark, nil)
- case .postfixQuestionMark:
- return (.postfixQuestionMark, nil)
+ case .floatingLiteral(let str):
+ return (.floatingLiteral, str)
+ case .identifier(let str):
+ return (.identifier, str)
case .infixQuestionMark:
return (.infixQuestionMark, nil)
- case .stringQuote:
- return (.stringQuote, nil)
- case .singleQuote:
- return (.singleQuote, nil)
+ case .integerLiteral(let str):
+ return (.integerLiteral, str)
+ case .keyword(let keyword):
+ return (.keyword, String(syntaxText: keyword.defaultText))
+ case .leftAngle:
+ return (.leftAngle, nil)
+ case .leftBrace:
+ return (.leftBrace, nil)
+ case .leftParen:
+ return (.leftParen, nil)
+ case .leftSquareBracket:
+ return (.leftSquareBracket, nil)
case .multilineStringQuote:
return (.multilineStringQuote, nil)
- case .poundSourceLocationKeyword:
- return (.poundSourceLocationKeyword, nil)
- case .poundIfKeyword:
- return (.poundIfKeyword, nil)
+ case .period:
+ return (.period, nil)
+ case .postfixOperator(let str):
+ return (.postfixOperator, str)
+ case .postfixQuestionMark:
+ return (.postfixQuestionMark, nil)
+ case .pound:
+ return (.pound, nil)
+ case .poundAvailableKeyword:
+ return (.poundAvailableKeyword, nil)
case .poundElseKeyword:
return (.poundElseKeyword, nil)
case .poundElseifKeyword:
return (.poundElseifKeyword, nil)
case .poundEndifKeyword:
return (.poundEndifKeyword, nil)
- case .poundAvailableKeyword:
- return (.poundAvailableKeyword, nil)
+ case .poundIfKeyword:
+ return (.poundIfKeyword, nil)
+ case .poundSourceLocationKeyword:
+ return (.poundSourceLocationKeyword, nil)
case .poundUnavailableKeyword:
return (.poundUnavailableKeyword, nil)
- case .integerLiteral(let str):
- return (.integerLiteral, str)
- case .floatingLiteral(let str):
- return (.floatingLiteral, str)
- case .regexLiteral(let str):
- return (.regexLiteral, str)
- case .unknown(let str):
- return (.unknown, str)
- case .identifier(let str):
- return (.identifier, str)
- case .binaryOperator(let str):
- return (.binaryOperator, str)
- case .postfixOperator(let str):
- return (.postfixOperator, str)
+ case .prefixAmpersand:
+ return (.prefixAmpersand, nil)
case .prefixOperator(let str):
return (.prefixOperator, str)
- case .dollarIdentifier(let str):
- return (.dollarIdentifier, str)
- case .keyword(let keyword):
- return (.keyword, String(syntaxText: keyword.defaultText))
case .rawStringDelimiter(let str):
return (.rawStringDelimiter, str)
+ case .regexLiteral(let str):
+ return (.regexLiteral, str)
+ case .rightAngle:
+ return (.rightAngle, nil)
+ case .rightBrace:
+ return (.rightBrace, nil)
+ case .rightParen:
+ return (.rightParen, nil)
+ case .rightSquareBracket:
+ return (.rightSquareBracket, nil)
+ case .semicolon:
+ return (.semicolon, nil)
+ case .singleQuote:
+ return (.singleQuote, nil)
+ case .stringQuote:
+ return (.stringQuote, nil)
case .stringSegment(let str):
return (.stringSegment, str)
+ case .unknown(let str):
+ return (.unknown, str)
+ case .wildcard:
+ return (.wildcard, nil)
}
}
}
diff --git a/Sources/SwiftSyntax/generated/Tokens.swift b/Sources/SwiftSyntax/generated/Tokens.swift
index 3fecee08dbf..36ec2bae871 100644
--- a/Sources/SwiftSyntax/generated/Tokens.swift
+++ b/Sources/SwiftSyntax/generated/Tokens.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,13 +15,13 @@
//===----------------------------------------------------------------------===//
extension TokenSyntax {
- public static func wildcardToken(
+ public static func arrowToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .wildcard,
+ .arrow,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -29,13 +29,13 @@ extension TokenSyntax {
)
}
- public static func leftParenToken(
+ public static func atSignToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .leftParen,
+ .atSign,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -43,13 +43,13 @@ extension TokenSyntax {
)
}
- public static func rightParenToken(
+ public static func backslashToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .rightParen,
+ .backslash,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -57,13 +57,13 @@ extension TokenSyntax {
)
}
- public static func leftBraceToken(
+ public static func backtickToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .leftBrace,
+ .backtick,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -71,13 +71,15 @@ extension TokenSyntax {
)
}
- public static func rightBraceToken(
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
+ public static func binaryOperator(
+ _ text: String,
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
+
) -> TokenSyntax {
return TokenSyntax(
- .rightBrace,
+ .binaryOperator(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -85,13 +87,13 @@ extension TokenSyntax {
)
}
- public static func leftSquareBracketToken(
+ public static func colonToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .leftSquareBracket,
+ .colon,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -99,13 +101,13 @@ extension TokenSyntax {
)
}
- public static func rightSquareBracketToken(
+ public static func commaToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .rightSquareBracket,
+ .comma,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -113,13 +115,15 @@ extension TokenSyntax {
)
}
- public static func leftAngleToken(
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
+ public static func dollarIdentifier(
+ _ text: String,
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
+
) -> TokenSyntax {
return TokenSyntax(
- .leftAngle,
+ .dollarIdentifier(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -127,13 +131,13 @@ extension TokenSyntax {
)
}
- public static func rightAngleToken(
+ public static func ellipsisToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .rightAngle,
+ .ellipsis,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -141,13 +145,13 @@ extension TokenSyntax {
)
}
- public static func periodToken(
+ public static func equalToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .period,
+ .equal,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -155,13 +159,13 @@ extension TokenSyntax {
)
}
- public static func commaToken(
+ public static func exclamationMarkToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .comma,
+ .exclamationMark,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -169,13 +173,15 @@ extension TokenSyntax {
)
}
- public static func ellipsisToken(
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
+ public static func floatingLiteral(
+ _ text: String,
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
+
) -> TokenSyntax {
return TokenSyntax(
- .ellipsis,
+ .floatingLiteral(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -183,13 +189,15 @@ extension TokenSyntax {
)
}
- public static func colonToken(
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
+ public static func identifier(
+ _ text: String,
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
+
) -> TokenSyntax {
return TokenSyntax(
- .colon,
+ .identifier(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -197,13 +205,13 @@ extension TokenSyntax {
)
}
- public static func semicolonToken(
+ public static func infixQuestionMarkToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .semicolon,
+ .infixQuestionMark,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -211,13 +219,15 @@ extension TokenSyntax {
)
}
- public static func equalToken(
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
+ public static func integerLiteral(
+ _ text: String,
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
+
) -> TokenSyntax {
return TokenSyntax(
- .equal,
+ .integerLiteral(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -225,13 +235,15 @@ extension TokenSyntax {
)
}
- public static func atSignToken(
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
+ public static func keyword(
+ _ value: Keyword,
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
+
) -> TokenSyntax {
return TokenSyntax(
- .atSign,
+ .keyword(value),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -239,13 +251,13 @@ extension TokenSyntax {
)
}
- public static func poundToken(
+ public static func leftAngleToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .pound,
+ .leftAngle,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -253,13 +265,13 @@ extension TokenSyntax {
)
}
- public static func prefixAmpersandToken(
+ public static func leftBraceToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .prefixAmpersand,
+ .leftBrace,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -267,13 +279,13 @@ extension TokenSyntax {
)
}
- public static func arrowToken(
+ public static func leftParenToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .arrow,
+ .leftParen,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -281,13 +293,13 @@ extension TokenSyntax {
)
}
- public static func backtickToken(
+ public static func leftSquareBracketToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .backtick,
+ .leftSquareBracket,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -295,13 +307,13 @@ extension TokenSyntax {
)
}
- public static func backslashToken(
+ public static func multilineStringQuoteToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .backslash,
+ .multilineStringQuote,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -309,13 +321,13 @@ extension TokenSyntax {
)
}
- public static func exclamationMarkToken(
+ public static func periodToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .exclamationMark,
+ .period,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -323,13 +335,15 @@ extension TokenSyntax {
)
}
- public static func postfixQuestionMarkToken(
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
+ public static func postfixOperator(
+ _ text: String,
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
+
) -> TokenSyntax {
return TokenSyntax(
- .postfixQuestionMark,
+ .postfixOperator(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -337,13 +351,13 @@ extension TokenSyntax {
)
}
- public static func infixQuestionMarkToken(
+ public static func postfixQuestionMarkToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .infixQuestionMark,
+ .postfixQuestionMark,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -351,13 +365,13 @@ extension TokenSyntax {
)
}
- public static func stringQuoteToken(
+ public static func poundToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .stringQuote,
+ .pound,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -365,13 +379,13 @@ extension TokenSyntax {
)
}
- public static func singleQuoteToken(
+ public static func poundAvailableKeyword(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .singleQuote,
+ .poundAvailableKeyword,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -379,13 +393,13 @@ extension TokenSyntax {
)
}
- public static func multilineStringQuoteToken(
+ public static func poundElseKeyword(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .multilineStringQuote,
+ .poundElseKeyword,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -393,13 +407,13 @@ extension TokenSyntax {
)
}
- public static func poundSourceLocationKeyword(
+ public static func poundElseifKeyword(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .poundSourceLocationKeyword,
+ .poundElseifKeyword,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -407,13 +421,13 @@ extension TokenSyntax {
)
}
- public static func poundIfKeyword(
+ public static func poundEndifKeyword(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .poundIfKeyword,
+ .poundEndifKeyword,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -421,13 +435,13 @@ extension TokenSyntax {
)
}
- public static func poundElseKeyword(
+ public static func poundIfKeyword(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .poundElseKeyword,
+ .poundIfKeyword,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -435,13 +449,13 @@ extension TokenSyntax {
)
}
- public static func poundElseifKeyword(
+ public static func poundSourceLocationKeyword(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .poundElseifKeyword,
+ .poundSourceLocationKeyword,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -449,13 +463,13 @@ extension TokenSyntax {
)
}
- public static func poundEndifKeyword(
+ public static func poundUnavailableKeyword(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .poundEndifKeyword,
+ .poundUnavailableKeyword,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -463,13 +477,13 @@ extension TokenSyntax {
)
}
- public static func poundAvailableKeyword(
+ public static func prefixAmpersandToken(
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .poundAvailableKeyword,
+ .prefixAmpersand,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -477,13 +491,15 @@ extension TokenSyntax {
)
}
- public static func poundUnavailableKeyword(
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
+ public static func prefixOperator(
+ _ text: String,
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
+
) -> TokenSyntax {
return TokenSyntax(
- .poundUnavailableKeyword,
+ .prefixOperator(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -491,7 +507,7 @@ extension TokenSyntax {
)
}
- public static func integerLiteral(
+ public static func rawStringDelimiter(
_ text: String,
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
@@ -499,7 +515,7 @@ extension TokenSyntax {
) -> TokenSyntax {
return TokenSyntax(
- .integerLiteral(text),
+ .rawStringDelimiter(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -507,7 +523,7 @@ extension TokenSyntax {
)
}
- public static func floatingLiteral(
+ public static func regexLiteral(
_ text: String,
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
@@ -515,7 +531,7 @@ extension TokenSyntax {
) -> TokenSyntax {
return TokenSyntax(
- .floatingLiteral(text),
+ .regexLiteral(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -523,15 +539,13 @@ extension TokenSyntax {
)
}
- public static func regexLiteral(
- _ text: String,
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
-
+ public static func rightAngleToken(
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .regexLiteral(text),
+ .rightAngle,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -539,15 +553,13 @@ extension TokenSyntax {
)
}
- public static func unknown(
- _ text: String,
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
-
+ public static func rightBraceToken(
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .unknown(text),
+ .rightBrace,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -555,15 +567,13 @@ extension TokenSyntax {
)
}
- public static func identifier(
- _ text: String,
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
-
+ public static func rightParenToken(
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .identifier(text),
+ .rightParen,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -571,15 +581,13 @@ extension TokenSyntax {
)
}
- public static func binaryOperator(
- _ text: String,
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
-
+ public static func rightSquareBracketToken(
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .binaryOperator(text),
+ .rightSquareBracket,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -587,15 +595,13 @@ extension TokenSyntax {
)
}
- public static func postfixOperator(
- _ text: String,
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
-
+ public static func semicolonToken(
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .postfixOperator(text),
+ .semicolon,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -603,15 +609,13 @@ extension TokenSyntax {
)
}
- public static func prefixOperator(
- _ text: String,
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
-
+ public static func singleQuoteToken(
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .prefixOperator(text),
+ .singleQuote,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -619,15 +623,13 @@ extension TokenSyntax {
)
}
- public static func dollarIdentifier(
- _ text: String,
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
-
+ public static func stringQuoteToken(
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .dollarIdentifier(text),
+ .stringQuote,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -635,15 +637,15 @@ extension TokenSyntax {
)
}
- public static func keyword(
- _ value: Keyword,
+ public static func stringSegment(
+ _ text: String,
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .keyword(value),
+ .stringSegment(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -651,7 +653,7 @@ extension TokenSyntax {
)
}
- public static func rawStringDelimiter(
+ public static func unknown(
_ text: String,
leadingTrivia: Trivia = [],
trailingTrivia: Trivia = [],
@@ -659,7 +661,7 @@ extension TokenSyntax {
) -> TokenSyntax {
return TokenSyntax(
- .rawStringDelimiter(text),
+ .unknown(text),
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
@@ -667,15 +669,13 @@ extension TokenSyntax {
)
}
- public static func stringSegment(
- _ text: String,
- leadingTrivia: Trivia = [],
- trailingTrivia: Trivia = [],
- presence: SourcePresence = .present
-
+ public static func wildcardToken(
+ leadingTrivia: Trivia = [],
+ trailingTrivia: Trivia = [],
+ presence: SourcePresence = .present
) -> TokenSyntax {
return TokenSyntax(
- .stringSegment(text),
+ .wildcard,
leadingTrivia: leadingTrivia,
trailingTrivia: trailingTrivia,
presence: presence
diff --git a/Sources/SwiftSyntax/generated/Trivia.swift b/Sources/SwiftSyntax/generated/Trivia.swift
index 7f30831083b..98ef06056dc 100644
--- a/Sources/SwiftSyntax/generated/Trivia.swift
+++ b/Sources/SwiftSyntax/generated/Trivia.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -29,20 +29,11 @@ public enum TriviaPosition {
/// In general, you should deal with the actual Trivia collection instead
/// of individual pieces whenever possible.
public enum TriviaPiece {
- /// A space ' ' character.
- case spaces(Int)
-
- /// A tab '\t' character.
- case tabs(Int)
-
- /// A vertical tab '\v' character.
- case verticalTabs(Int)
-
- /// A form-feed 'f' character.
- case formfeeds(Int)
+ /// A backslash that is at the end of a line in a multi-line string literal to escape the newline.
+ case backslashes(Int)
- /// A newline '\n' character.
- case newlines(Int)
+ /// A developer block comment, starting with '/*' and ending with '*/'.
+ case blockComment(String)
/// A newline '\r' character.
case carriageReturns(Int)
@@ -50,29 +41,38 @@ public enum TriviaPiece {
/// A newline consists of contiguous '\r' and '\n' characters.
case carriageReturnLineFeeds(Int)
- /// A developer line comment, starting with '//'
- case lineComment(String)
-
- /// A developer block comment, starting with '/*' and ending with '*/'.
- case blockComment(String)
+ /// A documentation block comment, starting with '/**' and ending with '*/'.
+ case docBlockComment(String)
/// A documentation line comment, starting with '///'.
case docLineComment(String)
- /// A documentation block comment, starting with '/**' and ending with '*/'.
- case docBlockComment(String)
+ /// A form-feed 'f' character.
+ case formfeeds(Int)
- /// A backslash that is at the end of a line in a multi-line string literal to escape the newline.
- case backslashes(Int)
+ /// A developer line comment, starting with '//'
+ case lineComment(String)
+
+ /// A newline '\n' character.
+ case newlines(Int)
/// A '#' that is at the end of a line in a multi-line string literal to escape the newline.
case pounds(Int)
+ /// A script command, starting with '#!'.
+ case shebang(String)
+
+ /// A space ' ' character.
+ case spaces(Int)
+
+ /// A tab '\t' character.
+ case tabs(Int)
+
/// Any skipped unexpected text.
case unexpectedText(String)
- /// A script command, starting with '#!'.
- case shebang(String)
+ /// A vertical tab '\v' character.
+ case verticalTabs(Int)
}
extension TriviaPiece: TextOutputStreamable {
@@ -86,36 +86,36 @@ extension TriviaPiece: TextOutputStreamable {
}
}
switch self {
- case let .spaces(count):
- printRepeated(" ", count: count)
- case let .tabs(count):
- printRepeated("\t", count: count)
- case let .verticalTabs(count):
- printRepeated("\u{b}", count: count)
- case let .formfeeds(count):
- printRepeated("\u{c}", count: count)
- case let .newlines(count):
- printRepeated("\n", count: count)
+ case let .backslashes(count):
+ printRepeated(#"\"#, count: count)
+ case let .blockComment(text):
+ target.write(text)
case let .carriageReturns(count):
printRepeated("\r", count: count)
case let .carriageReturnLineFeeds(count):
printRepeated("\r\n", count: count)
- case let .lineComment(text):
- target.write(text)
- case let .blockComment(text):
+ case let .docBlockComment(text):
target.write(text)
case let .docLineComment(text):
target.write(text)
- case let .docBlockComment(text):
+ case let .formfeeds(count):
+ printRepeated("\u{c}", count: count)
+ case let .lineComment(text):
target.write(text)
- case let .backslashes(count):
- printRepeated(#"\"#, count: count)
+ case let .newlines(count):
+ printRepeated("\n", count: count)
case let .pounds(count):
printRepeated("#", count: count)
- case let .unexpectedText(text):
- target.write(text)
case let .shebang(text):
target.write(text)
+ case let .spaces(count):
+ printRepeated(" ", count: count)
+ case let .tabs(count):
+ printRepeated("\t", count: count)
+ case let .unexpectedText(text):
+ target.write(text)
+ case let .verticalTabs(count):
+ printRepeated("\u{b}", count: count)
}
}
}
@@ -124,36 +124,36 @@ extension TriviaPiece: CustomDebugStringConvertible {
/// Returns a description used by dump.
public var debugDescription: String {
switch self {
- case .spaces(let data):
- return "spaces(\(data))"
- case .tabs(let data):
- return "tabs(\(data))"
- case .verticalTabs(let data):
- return "verticalTabs(\(data))"
- case .formfeeds(let data):
- return "formfeeds(\(data))"
- case .newlines(let data):
- return "newlines(\(data))"
+ case .backslashes(let data):
+ return "backslashes(\(data))"
+ case .blockComment(let name):
+ return "blockComment(\(name.debugDescription))"
case .carriageReturns(let data):
return "carriageReturns(\(data))"
case .carriageReturnLineFeeds(let data):
return "carriageReturnLineFeeds(\(data))"
- case .lineComment(let name):
- return "lineComment(\(name.debugDescription))"
- case .blockComment(let name):
- return "blockComment(\(name.debugDescription))"
- case .docLineComment(let name):
- return "docLineComment(\(name.debugDescription))"
case .docBlockComment(let name):
return "docBlockComment(\(name.debugDescription))"
- case .backslashes(let data):
- return "backslashes(\(data))"
+ case .docLineComment(let name):
+ return "docLineComment(\(name.debugDescription))"
+ case .formfeeds(let data):
+ return "formfeeds(\(data))"
+ case .lineComment(let name):
+ return "lineComment(\(name.debugDescription))"
+ case .newlines(let data):
+ return "newlines(\(data))"
case .pounds(let data):
return "pounds(\(data))"
- case .unexpectedText(let name):
- return "unexpectedText(\(name.debugDescription))"
case .shebang(let name):
return "shebang(\(name.debugDescription))"
+ case .spaces(let data):
+ return "spaces(\(data))"
+ case .tabs(let data):
+ return "tabs(\(data))"
+ case .unexpectedText(let name):
+ return "unexpectedText(\(name.debugDescription))"
+ case .verticalTabs(let data):
+ return "verticalTabs(\(data))"
}
}
}
@@ -200,7 +200,7 @@ public struct Trivia {
}
public var sourceLength: SourceLength {
- return pieces.map( {
+ return pieces.map({
$0.sourceLength
}).reduce(.zero, + )
}
@@ -210,54 +210,19 @@ public struct Trivia {
return sourceLength.utf8Length
}
- /// Returns a piece of trivia for some number of " " characters.
- public static func spaces(_ count: Int) -> Trivia {
- return [.spaces(count)]
- }
-
- /// Gets a piece of trivia for " " characters.
- public static var space: Trivia {
- return .spaces(1)
- }
-
- /// Returns a piece of trivia for some number of "\t" characters.
- public static func tabs(_ count: Int) -> Trivia {
- return [.tabs(count)]
- }
-
- /// Gets a piece of trivia for "\t" characters.
- public static var tab: Trivia {
- return .tabs(1)
- }
-
- /// Returns a piece of trivia for some number of "\u{b}" characters.
- public static func verticalTabs(_ count: Int) -> Trivia {
- return [.verticalTabs(count)]
- }
-
- /// Gets a piece of trivia for "\u{b}" characters.
- public static var verticalTab: Trivia {
- return .verticalTabs(1)
- }
-
- /// Returns a piece of trivia for some number of "\u{c}" characters.
- public static func formfeeds(_ count: Int) -> Trivia {
- return [.formfeeds(count)]
- }
-
- /// Gets a piece of trivia for "\u{c}" characters.
- public static var formfeed: Trivia {
- return .formfeeds(1)
+ /// Returns a piece of trivia for some number of #"\"# characters.
+ public static func backslashes(_ count: Int) -> Trivia {
+ return [.backslashes(count)]
}
- /// Returns a piece of trivia for some number of "\n" characters.
- public static func newlines(_ count: Int) -> Trivia {
- return [.newlines(count)]
+ /// Gets a piece of trivia for #"\"# characters.
+ public static var backslash: Trivia {
+ return .backslashes(1)
}
- /// Gets a piece of trivia for "\n" characters.
- public static var newline: Trivia {
- return .newlines(1)
+ /// Returns a piece of trivia for BlockComment.
+ public static func blockComment(_ text: String) -> Trivia {
+ return [.blockComment(text)]
}
/// Returns a piece of trivia for some number of "\r" characters.
@@ -280,14 +245,9 @@ public struct Trivia {
return .carriageReturnLineFeeds(1)
}
- /// Returns a piece of trivia for LineComment.
- public static func lineComment(_ text: String) -> Trivia {
- return [.lineComment(text)]
- }
-
- /// Returns a piece of trivia for BlockComment.
- public static func blockComment(_ text: String) -> Trivia {
- return [.blockComment(text)]
+ /// Returns a piece of trivia for DocBlockComment.
+ public static func docBlockComment(_ text: String) -> Trivia {
+ return [.docBlockComment(text)]
}
/// Returns a piece of trivia for DocLineComment.
@@ -295,19 +255,29 @@ public struct Trivia {
return [.docLineComment(text)]
}
- /// Returns a piece of trivia for DocBlockComment.
- public static func docBlockComment(_ text: String) -> Trivia {
- return [.docBlockComment(text)]
+ /// Returns a piece of trivia for some number of "\u{c}" characters.
+ public static func formfeeds(_ count: Int) -> Trivia {
+ return [.formfeeds(count)]
}
- /// Returns a piece of trivia for some number of #"\"# characters.
- public static func backslashes(_ count: Int) -> Trivia {
- return [.backslashes(count)]
+ /// Gets a piece of trivia for "\u{c}" characters.
+ public static var formfeed: Trivia {
+ return .formfeeds(1)
}
- /// Gets a piece of trivia for #"\"# characters.
- public static var backslash: Trivia {
- return .backslashes(1)
+ /// Returns a piece of trivia for LineComment.
+ public static func lineComment(_ text: String) -> Trivia {
+ return [.lineComment(text)]
+ }
+
+ /// Returns a piece of trivia for some number of "\n" characters.
+ public static func newlines(_ count: Int) -> Trivia {
+ return [.newlines(count)]
+ }
+
+ /// Gets a piece of trivia for "\n" characters.
+ public static var newline: Trivia {
+ return .newlines(1)
}
/// Returns a piece of trivia for some number of "#" characters.
@@ -320,14 +290,44 @@ public struct Trivia {
return .pounds(1)
}
+ /// Returns a piece of trivia for Shebang.
+ public static func shebang(_ text: String) -> Trivia {
+ return [.shebang(text)]
+ }
+
+ /// Returns a piece of trivia for some number of " " characters.
+ public static func spaces(_ count: Int) -> Trivia {
+ return [.spaces(count)]
+ }
+
+ /// Gets a piece of trivia for " " characters.
+ public static var space: Trivia {
+ return .spaces(1)
+ }
+
+ /// Returns a piece of trivia for some number of "\t" characters.
+ public static func tabs(_ count: Int) -> Trivia {
+ return [.tabs(count)]
+ }
+
+ /// Gets a piece of trivia for "\t" characters.
+ public static var tab: Trivia {
+ return .tabs(1)
+ }
+
/// Returns a piece of trivia for UnexpectedText.
public static func unexpectedText(_ text: String) -> Trivia {
return [.unexpectedText(text)]
}
- /// Returns a piece of trivia for Shebang.
- public static func shebang(_ text: String) -> Trivia {
- return [.shebang(text)]
+ /// Returns a piece of trivia for some number of "\u{b}" characters.
+ public static func verticalTabs(_ count: Int) -> Trivia {
+ return [.verticalTabs(count)]
+ }
+
+ /// Gets a piece of trivia for "\u{b}" characters.
+ public static var verticalTab: Trivia {
+ return .verticalTabs(1)
}
}
@@ -409,36 +409,36 @@ extension TriviaPiece: Equatable {}
extension TriviaPiece {
public var sourceLength: SourceLength {
switch self {
- case let .spaces(count):
- return SourceLength(utf8Length: count)
- case let .tabs(count):
- return SourceLength(utf8Length: count)
- case let .verticalTabs(count):
- return SourceLength(utf8Length: count)
- case let .formfeeds(count):
- return SourceLength(utf8Length: count)
- case let .newlines(count):
+ case let .backslashes(count):
return SourceLength(utf8Length: count)
+ case let .blockComment(text):
+ return SourceLength(of: text)
case let .carriageReturns(count):
return SourceLength(utf8Length: count)
case let .carriageReturnLineFeeds(count):
return SourceLength(utf8Length: count * 2)
- case let .lineComment(text):
- return SourceLength(of: text)
- case let .blockComment(text):
+ case let .docBlockComment(text):
return SourceLength(of: text)
case let .docLineComment(text):
return SourceLength(of: text)
- case let .docBlockComment(text):
+ case let .formfeeds(count):
+ return SourceLength(utf8Length: count)
+ case let .lineComment(text):
return SourceLength(of: text)
- case let .backslashes(count):
+ case let .newlines(count):
return SourceLength(utf8Length: count)
case let .pounds(count):
return SourceLength(utf8Length: count)
- case let .unexpectedText(text):
- return SourceLength(of: text)
case let .shebang(text):
return SourceLength(of: text)
+ case let .spaces(count):
+ return SourceLength(utf8Length: count)
+ case let .tabs(count):
+ return SourceLength(utf8Length: count)
+ case let .unexpectedText(text):
+ return SourceLength(of: text)
+ case let .verticalTabs(count):
+ return SourceLength(utf8Length: count)
}
}
}
@@ -449,68 +449,68 @@ extension TriviaPiece {
/// text of a the trivia.
@_spi(RawSyntax)
public enum RawTriviaPiece: Equatable {
- case spaces(Int)
+ case backslashes(Int)
- case tabs(Int)
+ case blockComment(SyntaxText)
- case verticalTabs(Int)
+ case carriageReturns(Int)
- case formfeeds(Int)
+ case carriageReturnLineFeeds(Int)
- case newlines(Int)
+ case docBlockComment(SyntaxText)
- case carriageReturns(Int)
+ case docLineComment(SyntaxText)
- case carriageReturnLineFeeds(Int)
+ case formfeeds(Int)
case lineComment(SyntaxText)
- case blockComment(SyntaxText)
+ case newlines(Int)
- case docLineComment(SyntaxText)
+ case pounds(Int)
- case docBlockComment(SyntaxText)
+ case shebang(SyntaxText)
- case backslashes(Int)
+ case spaces(Int)
- case pounds(Int)
+ case tabs(Int)
case unexpectedText(SyntaxText)
- case shebang(SyntaxText)
+ case verticalTabs(Int)
static func make(_ piece: TriviaPiece, arena: SyntaxArena) -> RawTriviaPiece {
switch piece {
- case let .spaces(count):
- return .spaces(count)
- case let .tabs(count):
- return .tabs(count)
- case let .verticalTabs(count):
- return .verticalTabs(count)
- case let .formfeeds(count):
- return .formfeeds(count)
- case let .newlines(count):
- return .newlines(count)
+ case let .backslashes(count):
+ return .backslashes(count)
+ case let .blockComment(text):
+ return .blockComment(arena.intern(text))
case let .carriageReturns(count):
return .carriageReturns(count)
case let .carriageReturnLineFeeds(count):
return .carriageReturnLineFeeds(count)
- case let .lineComment(text):
- return .lineComment(arena.intern(text))
- case let .blockComment(text):
- return .blockComment(arena.intern(text))
- case let .docLineComment(text):
- return .docLineComment(arena.intern(text))
case let .docBlockComment(text):
return .docBlockComment(arena.intern(text))
- case let .backslashes(count):
- return .backslashes(count)
+ case let .docLineComment(text):
+ return .docLineComment(arena.intern(text))
+ case let .formfeeds(count):
+ return .formfeeds(count)
+ case let .lineComment(text):
+ return .lineComment(arena.intern(text))
+ case let .newlines(count):
+ return .newlines(count)
case let .pounds(count):
return .pounds(count)
- case let .unexpectedText(text):
- return .unexpectedText(arena.intern(text))
case let .shebang(text):
return .shebang(arena.intern(text))
+ case let .spaces(count):
+ return .spaces(count)
+ case let .tabs(count):
+ return .tabs(count)
+ case let .unexpectedText(text):
+ return .unexpectedText(arena.intern(text))
+ case let .verticalTabs(count):
+ return .verticalTabs(count)
}
}
}
@@ -530,36 +530,36 @@ extension RawTriviaPiece: CustomDebugStringConvertible {
extension TriviaPiece {
@_spi(RawSyntax) public init(raw: RawTriviaPiece) {
switch raw {
- case let .spaces(count):
- self = .spaces(count)
- case let .tabs(count):
- self = .tabs(count)
- case let .verticalTabs(count):
- self = .verticalTabs(count)
- case let .formfeeds(count):
- self = .formfeeds(count)
- case let .newlines(count):
- self = .newlines(count)
+ case let .backslashes(count):
+ self = .backslashes(count)
+ case let .blockComment(text):
+ self = .blockComment(String(syntaxText: text))
case let .carriageReturns(count):
self = .carriageReturns(count)
case let .carriageReturnLineFeeds(count):
self = .carriageReturnLineFeeds(count)
- case let .lineComment(text):
- self = .lineComment(String(syntaxText: text))
- case let .blockComment(text):
- self = .blockComment(String(syntaxText: text))
- case let .docLineComment(text):
- self = .docLineComment(String(syntaxText: text))
case let .docBlockComment(text):
self = .docBlockComment(String(syntaxText: text))
- case let .backslashes(count):
- self = .backslashes(count)
+ case let .docLineComment(text):
+ self = .docLineComment(String(syntaxText: text))
+ case let .formfeeds(count):
+ self = .formfeeds(count)
+ case let .lineComment(text):
+ self = .lineComment(String(syntaxText: text))
+ case let .newlines(count):
+ self = .newlines(count)
case let .pounds(count):
self = .pounds(count)
- case let .unexpectedText(text):
- self = .unexpectedText(String(syntaxText: text))
case let .shebang(text):
self = .shebang(String(syntaxText: text))
+ case let .spaces(count):
+ self = .spaces(count)
+ case let .tabs(count):
+ self = .tabs(count)
+ case let .unexpectedText(text):
+ self = .unexpectedText(String(syntaxText: text))
+ case let .verticalTabs(count):
+ self = .verticalTabs(count)
}
}
}
@@ -567,71 +567,71 @@ extension TriviaPiece {
extension RawTriviaPiece {
public var byteLength: Int {
switch self {
- case let .spaces(count):
- return count
- case let .tabs(count):
- return count
- case let .verticalTabs(count):
- return count
- case let .formfeeds(count):
- return count
- case let .newlines(count):
+ case let .backslashes(count):
return count
+ case let .blockComment(text):
+ return text.count
case let .carriageReturns(count):
return count
case let .carriageReturnLineFeeds(count):
return count * 2
- case let .lineComment(text):
- return text.count
- case let .blockComment(text):
+ case let .docBlockComment(text):
return text.count
case let .docLineComment(text):
return text.count
- case let .docBlockComment(text):
+ case let .formfeeds(count):
+ return count
+ case let .lineComment(text):
return text.count
- case let .backslashes(count):
+ case let .newlines(count):
return count
case let .pounds(count):
return count
- case let .unexpectedText(text):
- return text.count
case let .shebang(text):
return text.count
+ case let .spaces(count):
+ return count
+ case let .tabs(count):
+ return count
+ case let .unexpectedText(text):
+ return text.count
+ case let .verticalTabs(count):
+ return count
}
}
var storedText: SyntaxText? {
switch self {
- case .spaces(_):
- return nil
- case .tabs(_):
- return nil
- case .verticalTabs(_):
- return nil
- case .formfeeds(_):
- return nil
- case .newlines(_):
+ case .backslashes(_):
return nil
+ case .blockComment(let text):
+ return text
case .carriageReturns(_):
return nil
case .carriageReturnLineFeeds(_):
return nil
- case .lineComment(let text):
- return text
- case .blockComment(let text):
+ case .docBlockComment(let text):
return text
case .docLineComment(let text):
return text
- case .docBlockComment(let text):
+ case .formfeeds(_):
+ return nil
+ case .lineComment(let text):
return text
- case .backslashes(_):
+ case .newlines(_):
return nil
case .pounds(_):
return nil
- case .unexpectedText(let text):
- return text
case .shebang(let text):
return text
+ case .spaces(_):
+ return nil
+ case .tabs(_):
+ return nil
+ case .unexpectedText(let text):
+ return text
+ case .verticalTabs(_):
+ return nil
}
}
}
diff --git a/Sources/SwiftSyntax/generated/raw/RawSyntaxNodes.swift b/Sources/SwiftSyntax/generated/raw/RawSyntaxNodes.swift
index e1ff6302bee..5a9baf698c3 100644
--- a/Sources/SwiftSyntax/generated/raw/RawSyntaxNodes.swift
+++ b/Sources/SwiftSyntax/generated/raw/RawSyntaxNodes.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -14,7 +14,6 @@
//
//===----------------------------------------------------------------------===//
-
@_spi(RawSyntax)
public protocol RawDeclSyntaxNodeProtocol: RawSyntaxNodeProtocol {}
diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxDeclNodes.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxDeclNodes.swift
index 216d6085925..3d08041b694 100644
--- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxDeclNodes.swift
+++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxDeclNodes.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxExprNodes.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxExprNodes.swift
index 3fd31866af8..a1f68224567 100644
--- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxExprNodes.swift
+++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxExprNodes.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift
index b547cbfb272..e6f1e67961a 100644
--- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift
+++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxPatternNodes.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxPatternNodes.swift
index d8071cba0ac..b7c85744287 100644
--- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxPatternNodes.swift
+++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxPatternNodes.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxStmtNodes.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxStmtNodes.swift
index 5e2c3f5fd88..2b2f2048a75 100644
--- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxStmtNodes.swift
+++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxStmtNodes.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxTypeNodes.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxTypeNodes.swift
index fbda1a8a5bb..ce9b9e71578 100644
--- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxTypeNodes.swift
+++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxTypeNodes.swift
@@ -6,7 +6,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/CMakeLists.txt b/Sources/SwiftSyntaxBuilder/CMakeLists.txt
index 7f700cc86aa..67b4be8a75e 100644
--- a/Sources/SwiftSyntaxBuilder/CMakeLists.txt
+++ b/Sources/SwiftSyntaxBuilder/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift b/Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift
index d07eef5627c..3c909041b0c 100644
--- a/Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift
+++ b/Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/Indenter.swift b/Sources/SwiftSyntaxBuilder/Indenter.swift
index 5bd2d6901fa..48e62d77e4d 100644
--- a/Sources/SwiftSyntaxBuilder/Indenter.swift
+++ b/Sources/SwiftSyntaxBuilder/Indenter.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/ResultBuilderExtensions.swift b/Sources/SwiftSyntaxBuilder/ResultBuilderExtensions.swift
index dafd599fd2a..285ad7eaa35 100644
--- a/Sources/SwiftSyntaxBuilder/ResultBuilderExtensions.swift
+++ b/Sources/SwiftSyntaxBuilder/ResultBuilderExtensions.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/Syntax+StringInterpolation.swift b/Sources/SwiftSyntaxBuilder/Syntax+StringInterpolation.swift
index 570a4c970ae..9d0b8d5d0c7 100644
--- a/Sources/SwiftSyntaxBuilder/Syntax+StringInterpolation.swift
+++ b/Sources/SwiftSyntaxBuilder/Syntax+StringInterpolation.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift b/Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift
index 2f411053238..822eca39d88 100644
--- a/Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift
+++ b/Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/WithTrailingCommaSyntax+EnsuringTrailingComma.swift b/Sources/SwiftSyntaxBuilder/WithTrailingCommaSyntax+EnsuringTrailingComma.swift
index 81f8a756241..f5c0c2de9fc 100644
--- a/Sources/SwiftSyntaxBuilder/WithTrailingCommaSyntax+EnsuringTrailingComma.swift
+++ b/Sources/SwiftSyntaxBuilder/WithTrailingCommaSyntax+EnsuringTrailingComma.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/generated/BuildableCollectionNodes.swift b/Sources/SwiftSyntaxBuilder/generated/BuildableCollectionNodes.swift
index 33efd680bba..2d7eef9d053 100644
--- a/Sources/SwiftSyntaxBuilder/generated/BuildableCollectionNodes.swift
+++ b/Sources/SwiftSyntaxBuilder/generated/BuildableCollectionNodes.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/generated/BuildableNodes.swift b/Sources/SwiftSyntaxBuilder/generated/BuildableNodes.swift
index 862c96ac2be..269e3bd7620 100644
--- a/Sources/SwiftSyntaxBuilder/generated/BuildableNodes.swift
+++ b/Sources/SwiftSyntaxBuilder/generated/BuildableNodes.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/generated/ResultBuilders.swift b/Sources/SwiftSyntaxBuilder/generated/ResultBuilders.swift
index 2e5b6253b97..de51ddd7a14 100644
--- a/Sources/SwiftSyntaxBuilder/generated/ResultBuilders.swift
+++ b/Sources/SwiftSyntaxBuilder/generated/ResultBuilders.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxBuilder/generated/SyntaxExpressibleByStringInterpolationConformances.swift b/Sources/SwiftSyntaxBuilder/generated/SyntaxExpressibleByStringInterpolationConformances.swift
index 733dee36cd1..1da951d23a3 100644
--- a/Sources/SwiftSyntaxBuilder/generated/SyntaxExpressibleByStringInterpolationConformances.swift
+++ b/Sources/SwiftSyntaxBuilder/generated/SyntaxExpressibleByStringInterpolationConformances.swift
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -13,7 +13,6 @@
//
//===----------------------------------------------------------------------===//
-
import SwiftSyntax
import SwiftParser
import SwiftParserDiagnostics
diff --git a/Sources/SwiftSyntaxMacros/BasicMacroExpansionContext.swift b/Sources/SwiftSyntaxMacros/BasicMacroExpansionContext.swift
index aa2de90b480..7794d13f2bb 100644
--- a/Sources/SwiftSyntaxMacros/BasicMacroExpansionContext.swift
+++ b/Sources/SwiftSyntaxMacros/BasicMacroExpansionContext.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxMacros/CMakeLists.txt b/Sources/SwiftSyntaxMacros/CMakeLists.txt
index c2ca70035b6..ecf4f7f0508 100644
--- a/Sources/SwiftSyntaxMacros/CMakeLists.txt
+++ b/Sources/SwiftSyntaxMacros/CMakeLists.txt
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxMacros/MacroExpansionContext.swift b/Sources/SwiftSyntaxMacros/MacroExpansionContext.swift
index 0212a55480a..43ae1ff03ea 100644
--- a/Sources/SwiftSyntaxMacros/MacroExpansionContext.swift
+++ b/Sources/SwiftSyntaxMacros/MacroExpansionContext.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxMacros/MacroProtocols/ExpressionMacro.swift b/Sources/SwiftSyntaxMacros/MacroProtocols/ExpressionMacro.swift
index 608a0162078..c1424fc4880 100644
--- a/Sources/SwiftSyntaxMacros/MacroProtocols/ExpressionMacro.swift
+++ b/Sources/SwiftSyntaxMacros/MacroProtocols/ExpressionMacro.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxMacros/MacroProtocols/Macro.swift b/Sources/SwiftSyntaxMacros/MacroProtocols/Macro.swift
index 99b6ee4f917..90f87267a5d 100644
--- a/Sources/SwiftSyntaxMacros/MacroProtocols/Macro.swift
+++ b/Sources/SwiftSyntaxMacros/MacroProtocols/Macro.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxMacros/MacroProtocols/MemberAttributeMacro.swift b/Sources/SwiftSyntaxMacros/MacroProtocols/MemberAttributeMacro.swift
index 53ce94a4edf..15ba617de37 100644
--- a/Sources/SwiftSyntaxMacros/MacroProtocols/MemberAttributeMacro.swift
+++ b/Sources/SwiftSyntaxMacros/MacroProtocols/MemberAttributeMacro.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxMacros/MacroProtocols/MemberMacro.swift b/Sources/SwiftSyntaxMacros/MacroProtocols/MemberMacro.swift
index 8e55d902118..9ebfb390b9f 100644
--- a/Sources/SwiftSyntaxMacros/MacroProtocols/MemberMacro.swift
+++ b/Sources/SwiftSyntaxMacros/MacroProtocols/MemberMacro.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxMacros/MacroSystem.swift b/Sources/SwiftSyntaxMacros/MacroSystem.swift
index 10447b78f80..8e388c39b7c 100644
--- a/Sources/SwiftSyntaxMacros/MacroSystem.swift
+++ b/Sources/SwiftSyntaxMacros/MacroSystem.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxMacros/Syntax+MacroEvaluation.swift b/Sources/SwiftSyntaxMacros/Syntax+MacroEvaluation.swift
index f6d62354448..701405b92f3 100644
--- a/Sources/SwiftSyntaxMacros/Syntax+MacroEvaluation.swift
+++ b/Sources/SwiftSyntaxMacros/Syntax+MacroEvaluation.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxParser/Diagnostic.swift b/Sources/SwiftSyntaxParser/Diagnostic.swift
index 437f15a1899..f8abb3d685f 100644
--- a/Sources/SwiftSyntaxParser/Diagnostic.swift
+++ b/Sources/SwiftSyntaxParser/Diagnostic.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/SwiftSyntaxParser/SyntaxParser.swift b/Sources/SwiftSyntaxParser/SyntaxParser.swift
index cb43007667c..37f9c64d0b2 100644
--- a/Sources/SwiftSyntaxParser/SyntaxParser.swift
+++ b/Sources/SwiftSyntaxParser/SyntaxParser.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/_SwiftSyntaxTestSupport/AssertEqualWithDiff.swift b/Sources/_SwiftSyntaxTestSupport/AssertEqualWithDiff.swift
index a973d1ace87..eaf3b00dda4 100644
--- a/Sources/_SwiftSyntaxTestSupport/AssertEqualWithDiff.swift
+++ b/Sources/_SwiftSyntaxTestSupport/AssertEqualWithDiff.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/_SwiftSyntaxTestSupport/LocationMarkers.swift b/Sources/_SwiftSyntaxTestSupport/LocationMarkers.swift
index 9a8c1b4dc3e..15c37a0b87b 100644
--- a/Sources/_SwiftSyntaxTestSupport/LocationMarkers.swift
+++ b/Sources/_SwiftSyntaxTestSupport/LocationMarkers.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/_SwiftSyntaxTestSupport/String+TrimmingTrailingWhitespace.swift b/Sources/_SwiftSyntaxTestSupport/String+TrimmingTrailingWhitespace.swift
index dcc43b605dc..e48bf6dc367 100644
--- a/Sources/_SwiftSyntaxTestSupport/String+TrimmingTrailingWhitespace.swift
+++ b/Sources/_SwiftSyntaxTestSupport/String+TrimmingTrailingWhitespace.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/_SwiftSyntaxTestSupport/Syntax+Assertions.swift b/Sources/_SwiftSyntaxTestSupport/Syntax+Assertions.swift
index 8410d0846c4..637a5b7af21 100644
--- a/Sources/_SwiftSyntaxTestSupport/Syntax+Assertions.swift
+++ b/Sources/_SwiftSyntaxTestSupport/Syntax+Assertions.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/_SwiftSyntaxTestSupport/SyntaxCollection+AtIndex.swift.swift b/Sources/_SwiftSyntaxTestSupport/SyntaxCollection+AtIndex.swift.swift
index 86e0207e673..7d876c66388 100644
--- a/Sources/_SwiftSyntaxTestSupport/SyntaxCollection+AtIndex.swift.swift
+++ b/Sources/_SwiftSyntaxTestSupport/SyntaxCollection+AtIndex.swift.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/_SwiftSyntaxTestSupport/SyntaxComparison.swift b/Sources/_SwiftSyntaxTestSupport/SyntaxComparison.swift
index 038d5c11774..fa92f2bc1c3 100644
--- a/Sources/_SwiftSyntaxTestSupport/SyntaxComparison.swift
+++ b/Sources/_SwiftSyntaxTestSupport/SyntaxComparison.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/_SwiftSyntaxTestSupport/SyntaxProtocol+Initializer.swift b/Sources/_SwiftSyntaxTestSupport/SyntaxProtocol+Initializer.swift
index df4b7794fe4..65a6f4d1a21 100644
--- a/Sources/_SwiftSyntaxTestSupport/SyntaxProtocol+Initializer.swift
+++ b/Sources/_SwiftSyntaxTestSupport/SyntaxProtocol+Initializer.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/_SwiftSyntaxTestSupport/TestUtils.swift b/Sources/_SwiftSyntaxTestSupport/TestUtils.swift
index b4ff9b4c44f..08b92aa847a 100644
--- a/Sources/_SwiftSyntaxTestSupport/TestUtils.swift
+++ b/Sources/_SwiftSyntaxTestSupport/TestUtils.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/lit-test-helper/ClassifiedSyntaxTreePrinter.swift b/Sources/lit-test-helper/ClassifiedSyntaxTreePrinter.swift
index 1dfccca8674..8a1b0bb2a73 100644
--- a/Sources/lit-test-helper/ClassifiedSyntaxTreePrinter.swift
+++ b/Sources/lit-test-helper/ClassifiedSyntaxTreePrinter.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/lit-test-helper/CommandLineArguments.swift b/Sources/lit-test-helper/CommandLineArguments.swift
index e9a78c93e53..fbbe7d10cfb 100644
--- a/Sources/lit-test-helper/CommandLineArguments.swift
+++ b/Sources/lit-test-helper/CommandLineArguments.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/lit-test-helper/main.swift b/Sources/lit-test-helper/main.swift
index 5c4fce2507b..d23bc4ee7f9 100644
--- a/Sources/lit-test-helper/main.swift
+++ b/Sources/lit-test-helper/main.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/swift-parser-cli/TerminalUtils.swift b/Sources/swift-parser-cli/TerminalUtils.swift
index 8956ea49a04..f6f07e002fe 100644
--- a/Sources/swift-parser-cli/TerminalUtils.swift
+++ b/Sources/swift-parser-cli/TerminalUtils.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Sources/swift-parser-cli/swift-parser-cli.swift b/Sources/swift-parser-cli/swift-parser-cli.swift
index 676b3e628fe..fa99f4c6d97 100644
--- a/Sources/swift-parser-cli/swift-parser-cli.swift
+++ b/Sources/swift-parser-cli/swift-parser-cli.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/IDEUtilsTest/ClassificationTests.swift b/Tests/IDEUtilsTest/ClassificationTests.swift
index 6ad58ae79c3..1b1d5926bb3 100644
--- a/Tests/IDEUtilsTest/ClassificationTests.swift
+++ b/Tests/IDEUtilsTest/ClassificationTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/PerformanceTest/Inputs/MinimalCollections.swift.input b/Tests/PerformanceTest/Inputs/MinimalCollections.swift.input
index b17b5517ddf..4cdcb79bb5b 100644
--- a/Tests/PerformanceTest/Inputs/MinimalCollections.swift.input
+++ b/Tests/PerformanceTest/Inputs/MinimalCollections.swift.input
@@ -5,7 +5,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/PerformanceTest/ParsingPerformanceTests.swift b/Tests/PerformanceTest/ParsingPerformanceTests.swift
index c2735295591..f45dd0a4208 100644
--- a/Tests/PerformanceTest/ParsingPerformanceTests.swift
+++ b/Tests/PerformanceTest/ParsingPerformanceTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/PerformanceTest/SyntaxClassifierPerformanceTests.swift b/Tests/PerformanceTest/SyntaxClassifierPerformanceTests.swift
index 9109b69a7b3..e17d3d54e6d 100644
--- a/Tests/PerformanceTest/SyntaxClassifierPerformanceTests.swift
+++ b/Tests/PerformanceTest/SyntaxClassifierPerformanceTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/PerformanceTest/VisitorPerformanceTests.swift b/Tests/PerformanceTest/VisitorPerformanceTests.swift
index 5db980e972d..d39c8918f2d 100644
--- a/Tests/PerformanceTest/VisitorPerformanceTests.swift
+++ b/Tests/PerformanceTest/VisitorPerformanceTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftDiagnosticsTest/DiagnosticsFormatterTests.swift b/Tests/SwiftDiagnosticsTest/DiagnosticsFormatterTests.swift
index 14d3d453406..db08c98619c 100644
--- a/Tests/SwiftDiagnosticsTest/DiagnosticsFormatterTests.swift
+++ b/Tests/SwiftDiagnosticsTest/DiagnosticsFormatterTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftOperatorsTest/OperatorTableTests.swift b/Tests/SwiftOperatorsTest/OperatorTableTests.swift
index bd9794ec770..ad9511d08c1 100644
--- a/Tests/SwiftOperatorsTest/OperatorTableTests.swift
+++ b/Tests/SwiftOperatorsTest/OperatorTableTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftOperatorsTest/SyntaxSynthesisTests.swift b/Tests/SwiftOperatorsTest/SyntaxSynthesisTests.swift
index 53595936066..6f04057dfa9 100644
--- a/Tests/SwiftOperatorsTest/SyntaxSynthesisTests.swift
+++ b/Tests/SwiftOperatorsTest/SyntaxSynthesisTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserDiagnosticsTest/DiagnosticInfrastructureTests.swift b/Tests/SwiftParserDiagnosticsTest/DiagnosticInfrastructureTests.swift
index 50c7ddf6d5c..3c7a43fcd3c 100644
--- a/Tests/SwiftParserDiagnosticsTest/DiagnosticInfrastructureTests.swift
+++ b/Tests/SwiftParserDiagnosticsTest/DiagnosticInfrastructureTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/AbsolutePositionTests.swift b/Tests/SwiftParserTest/AbsolutePositionTests.swift
index c03ee691e8b..1a28c140ce2 100644
--- a/Tests/SwiftParserTest/AbsolutePositionTests.swift
+++ b/Tests/SwiftParserTest/AbsolutePositionTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/Assertions.swift b/Tests/SwiftParserTest/Assertions.swift
index f6f9ab4110e..1e2fd7b34a7 100644
--- a/Tests/SwiftParserTest/Assertions.swift
+++ b/Tests/SwiftParserTest/Assertions.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/AttributeTests.swift b/Tests/SwiftParserTest/AttributeTests.swift
index 9f1702850b0..02b302ea1c1 100644
--- a/Tests/SwiftParserTest/AttributeTests.swift
+++ b/Tests/SwiftParserTest/AttributeTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/AvailabilityTests.swift b/Tests/SwiftParserTest/AvailabilityTests.swift
index 68ca063d595..1080037b7a1 100644
--- a/Tests/SwiftParserTest/AvailabilityTests.swift
+++ b/Tests/SwiftParserTest/AvailabilityTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/DeclarationTests.swift b/Tests/SwiftParserTest/DeclarationTests.swift
index e51bd0ad219..bd6925e709d 100644
--- a/Tests/SwiftParserTest/DeclarationTests.swift
+++ b/Tests/SwiftParserTest/DeclarationTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/DirectiveTests.swift b/Tests/SwiftParserTest/DirectiveTests.swift
index 8df392d09db..5af4053f8c6 100644
--- a/Tests/SwiftParserTest/DirectiveTests.swift
+++ b/Tests/SwiftParserTest/DirectiveTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/ExpressionTests.swift b/Tests/SwiftParserTest/ExpressionTests.swift
index 828f5a9b2a0..20baec69084 100644
--- a/Tests/SwiftParserTest/ExpressionTests.swift
+++ b/Tests/SwiftParserTest/ExpressionTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/ExpressionTypeTests.swift b/Tests/SwiftParserTest/ExpressionTypeTests.swift
index 3b26dd7d588..826992be2ca 100644
--- a/Tests/SwiftParserTest/ExpressionTypeTests.swift
+++ b/Tests/SwiftParserTest/ExpressionTypeTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/LexerTests.swift b/Tests/SwiftParserTest/LexerTests.swift
index 77099ec44e8..633de4139fb 100644
--- a/Tests/SwiftParserTest/LexerTests.swift
+++ b/Tests/SwiftParserTest/LexerTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/LinkageTests.swift b/Tests/SwiftParserTest/LinkageTests.swift
index cd883c9fe9a..c17b92b3913 100644
--- a/Tests/SwiftParserTest/LinkageTests.swift
+++ b/Tests/SwiftParserTest/LinkageTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/Parser+EntryTests.swift b/Tests/SwiftParserTest/Parser+EntryTests.swift
index 63d62ff6790..60e919be1e2 100644
--- a/Tests/SwiftParserTest/Parser+EntryTests.swift
+++ b/Tests/SwiftParserTest/Parser+EntryTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/ParserTests.swift b/Tests/SwiftParserTest/ParserTests.swift
index c821a48b22c..4f3d447cedc 100644
--- a/Tests/SwiftParserTest/ParserTests.swift
+++ b/Tests/SwiftParserTest/ParserTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/StatementTests.swift b/Tests/SwiftParserTest/StatementTests.swift
index 6405489d42c..90215c324ae 100644
--- a/Tests/SwiftParserTest/StatementTests.swift
+++ b/Tests/SwiftParserTest/StatementTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/SyntaxTransformVisitorTest.swift b/Tests/SwiftParserTest/SyntaxTransformVisitorTest.swift
index 9efa79cb04a..b12542f405f 100644
--- a/Tests/SwiftParserTest/SyntaxTransformVisitorTest.swift
+++ b/Tests/SwiftParserTest/SyntaxTransformVisitorTest.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/TriviaParserTests.swift b/Tests/SwiftParserTest/TriviaParserTests.swift
index 43e7b57fd06..8e9a4955c62 100644
--- a/Tests/SwiftParserTest/TriviaParserTests.swift
+++ b/Tests/SwiftParserTest/TriviaParserTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/TypeCompositionTests.swift b/Tests/SwiftParserTest/TypeCompositionTests.swift
index 3a486cd99f7..5a8994b0033 100644
--- a/Tests/SwiftParserTest/TypeCompositionTests.swift
+++ b/Tests/SwiftParserTest/TypeCompositionTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/TypeMemberTests.swift b/Tests/SwiftParserTest/TypeMemberTests.swift
index 0fbd46f021e..2355392e932 100644
--- a/Tests/SwiftParserTest/TypeMemberTests.swift
+++ b/Tests/SwiftParserTest/TypeMemberTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/TypeMetatypeTests.swift b/Tests/SwiftParserTest/TypeMetatypeTests.swift
index bb75e04e4ea..9bc315c8a2e 100644
--- a/Tests/SwiftParserTest/TypeMetatypeTests.swift
+++ b/Tests/SwiftParserTest/TypeMetatypeTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/TypeTests.swift b/Tests/SwiftParserTest/TypeTests.swift
index ff8fa6f5dac..faf541932b6 100644
--- a/Tests/SwiftParserTest/TypeTests.swift
+++ b/Tests/SwiftParserTest/TypeTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/Utils.swift b/Tests/SwiftParserTest/Utils.swift
index cb2452a29c9..08fccfd1259 100644
--- a/Tests/SwiftParserTest/Utils.swift
+++ b/Tests/SwiftParserTest/Utils.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/VariadicGenericsTests.swift b/Tests/SwiftParserTest/VariadicGenericsTests.swift
index 59952af5df7..25df23fe06c 100644
--- a/Tests/SwiftParserTest/VariadicGenericsTests.swift
+++ b/Tests/SwiftParserTest/VariadicGenericsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ActorTests.swift b/Tests/SwiftParserTest/translated/ActorTests.swift
index 257765e2dab..71f4b50847e 100644
--- a/Tests/SwiftParserTest/translated/ActorTests.swift
+++ b/Tests/SwiftParserTest/translated/ActorTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/AlwaysEmitConformanceMetadataAttrTests.swift b/Tests/SwiftParserTest/translated/AlwaysEmitConformanceMetadataAttrTests.swift
index 6f27b6e3095..e60ec1d312e 100644
--- a/Tests/SwiftParserTest/translated/AlwaysEmitConformanceMetadataAttrTests.swift
+++ b/Tests/SwiftParserTest/translated/AlwaysEmitConformanceMetadataAttrTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/AsyncSyntaxTests.swift b/Tests/SwiftParserTest/translated/AsyncSyntaxTests.swift
index 1b7fd829209..057d57d2c03 100644
--- a/Tests/SwiftParserTest/translated/AsyncSyntaxTests.swift
+++ b/Tests/SwiftParserTest/translated/AsyncSyntaxTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/AsyncTests.swift b/Tests/SwiftParserTest/translated/AsyncTests.swift
index 33e31f5bbdb..06b90ae8b54 100644
--- a/Tests/SwiftParserTest/translated/AsyncTests.swift
+++ b/Tests/SwiftParserTest/translated/AsyncTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/AvailabilityQueryTests.swift b/Tests/SwiftParserTest/translated/AvailabilityQueryTests.swift
index 688572e7b5b..fa2272d08ad 100644
--- a/Tests/SwiftParserTest/translated/AvailabilityQueryTests.swift
+++ b/Tests/SwiftParserTest/translated/AvailabilityQueryTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/AvailabilityQueryUnavailabilityTests.swift b/Tests/SwiftParserTest/translated/AvailabilityQueryUnavailabilityTests.swift
index 87b9dee6b61..9367c4653ab 100644
--- a/Tests/SwiftParserTest/translated/AvailabilityQueryUnavailabilityTests.swift
+++ b/Tests/SwiftParserTest/translated/AvailabilityQueryUnavailabilityTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/BorrowExprTests.swift b/Tests/SwiftParserTest/translated/BorrowExprTests.swift
index 7cbc8b23e49..481d862ba84 100644
--- a/Tests/SwiftParserTest/translated/BorrowExprTests.swift
+++ b/Tests/SwiftParserTest/translated/BorrowExprTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/BraceRecoveryEofTests.swift b/Tests/SwiftParserTest/translated/BraceRecoveryEofTests.swift
index 8b00026ba73..c70be8bdfb5 100644
--- a/Tests/SwiftParserTest/translated/BraceRecoveryEofTests.swift
+++ b/Tests/SwiftParserTest/translated/BraceRecoveryEofTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/BuiltinBridgeObjectTests.swift b/Tests/SwiftParserTest/translated/BuiltinBridgeObjectTests.swift
index 7dd178d8b9f..f8b40716edf 100644
--- a/Tests/SwiftParserTest/translated/BuiltinBridgeObjectTests.swift
+++ b/Tests/SwiftParserTest/translated/BuiltinBridgeObjectTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/BuiltinWordTests.swift b/Tests/SwiftParserTest/translated/BuiltinWordTests.swift
index 9d8dab8c9b2..1a72d23fdb6 100644
--- a/Tests/SwiftParserTest/translated/BuiltinWordTests.swift
+++ b/Tests/SwiftParserTest/translated/BuiltinWordTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ConflictMarkersTests.swift b/Tests/SwiftParserTest/translated/ConflictMarkersTests.swift
index 5d68d278e90..9a3e12ae041 100644
--- a/Tests/SwiftParserTest/translated/ConflictMarkersTests.swift
+++ b/Tests/SwiftParserTest/translated/ConflictMarkersTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ConsecutiveStatementsTests.swift b/Tests/SwiftParserTest/translated/ConsecutiveStatementsTests.swift
index 74e99d99203..3a7e11c9447 100644
--- a/Tests/SwiftParserTest/translated/ConsecutiveStatementsTests.swift
+++ b/Tests/SwiftParserTest/translated/ConsecutiveStatementsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/DebuggerTests.swift b/Tests/SwiftParserTest/translated/DebuggerTests.swift
index aca19bf1154..fd7f381953e 100644
--- a/Tests/SwiftParserTest/translated/DebuggerTests.swift
+++ b/Tests/SwiftParserTest/translated/DebuggerTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/DelayedExtensionTests.swift b/Tests/SwiftParserTest/translated/DelayedExtensionTests.swift
index 49225e8c00f..c7bf23d8593 100644
--- a/Tests/SwiftParserTest/translated/DelayedExtensionTests.swift
+++ b/Tests/SwiftParserTest/translated/DelayedExtensionTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/DeprecatedWhereTests.swift b/Tests/SwiftParserTest/translated/DeprecatedWhereTests.swift
index 0034d4cc612..c32a7ede71e 100644
--- a/Tests/SwiftParserTest/translated/DeprecatedWhereTests.swift
+++ b/Tests/SwiftParserTest/translated/DeprecatedWhereTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/DiagnoseAvailabilityTests.swift b/Tests/SwiftParserTest/translated/DiagnoseAvailabilityTests.swift
index 25915e182ce..07643f75bc8 100644
--- a/Tests/SwiftParserTest/translated/DiagnoseAvailabilityTests.swift
+++ b/Tests/SwiftParserTest/translated/DiagnoseAvailabilityTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/DiagnoseAvailabilityWindowsTests.swift b/Tests/SwiftParserTest/translated/DiagnoseAvailabilityWindowsTests.swift
index 5e626102460..43f13aa70f1 100644
--- a/Tests/SwiftParserTest/translated/DiagnoseAvailabilityWindowsTests.swift
+++ b/Tests/SwiftParserTest/translated/DiagnoseAvailabilityWindowsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/DiagnoseDynamicReplacementTests.swift b/Tests/SwiftParserTest/translated/DiagnoseDynamicReplacementTests.swift
index cae3dd1a992..d9efb72641a 100644
--- a/Tests/SwiftParserTest/translated/DiagnoseDynamicReplacementTests.swift
+++ b/Tests/SwiftParserTest/translated/DiagnoseDynamicReplacementTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/DiagnoseInitializerAsTypedPatternTests.swift b/Tests/SwiftParserTest/translated/DiagnoseInitializerAsTypedPatternTests.swift
index 7c97bd9f2f7..9f6a600d203 100644
--- a/Tests/SwiftParserTest/translated/DiagnoseInitializerAsTypedPatternTests.swift
+++ b/Tests/SwiftParserTest/translated/DiagnoseInitializerAsTypedPatternTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/DiagnosticMissingFuncKeywordTests.swift b/Tests/SwiftParserTest/translated/DiagnosticMissingFuncKeywordTests.swift
index da86d6dd7fa..b2b347cbcbb 100644
--- a/Tests/SwiftParserTest/translated/DiagnosticMissingFuncKeywordTests.swift
+++ b/Tests/SwiftParserTest/translated/DiagnosticMissingFuncKeywordTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/DollarIdentifierTests.swift b/Tests/SwiftParserTest/translated/DollarIdentifierTests.swift
index 1d5e9edce31..a4f78729052 100644
--- a/Tests/SwiftParserTest/translated/DollarIdentifierTests.swift
+++ b/Tests/SwiftParserTest/translated/DollarIdentifierTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/EffectfulPropertiesTests.swift b/Tests/SwiftParserTest/translated/EffectfulPropertiesTests.swift
index 40c8fdafdec..fe3f2e189fc 100644
--- a/Tests/SwiftParserTest/translated/EffectfulPropertiesTests.swift
+++ b/Tests/SwiftParserTest/translated/EffectfulPropertiesTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/EnumElementPatternSwift4Tests.swift b/Tests/SwiftParserTest/translated/EnumElementPatternSwift4Tests.swift
index b2761d89927..ba2b606f9e3 100644
--- a/Tests/SwiftParserTest/translated/EnumElementPatternSwift4Tests.swift
+++ b/Tests/SwiftParserTest/translated/EnumElementPatternSwift4Tests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/EnumTests.swift b/Tests/SwiftParserTest/translated/EnumTests.swift
index 4407d4dc514..3ee96778579 100644
--- a/Tests/SwiftParserTest/translated/EnumTests.swift
+++ b/Tests/SwiftParserTest/translated/EnumTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ErrorsTests.swift b/Tests/SwiftParserTest/translated/ErrorsTests.swift
index dc9e6e09ac7..95aa006d6ae 100644
--- a/Tests/SwiftParserTest/translated/ErrorsTests.swift
+++ b/Tests/SwiftParserTest/translated/ErrorsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/EscapedIdentifiersTests.swift b/Tests/SwiftParserTest/translated/EscapedIdentifiersTests.swift
index 0d769f041ee..60edcd4e211 100644
--- a/Tests/SwiftParserTest/translated/EscapedIdentifiersTests.swift
+++ b/Tests/SwiftParserTest/translated/EscapedIdentifiersTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ForeachAsyncTests.swift b/Tests/SwiftParserTest/translated/ForeachAsyncTests.swift
index 18f7e8ad8ae..85bb922821d 100644
--- a/Tests/SwiftParserTest/translated/ForeachAsyncTests.swift
+++ b/Tests/SwiftParserTest/translated/ForeachAsyncTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ForeachTests.swift b/Tests/SwiftParserTest/translated/ForeachTests.swift
index 4514c04beee..93a82ce98bb 100644
--- a/Tests/SwiftParserTest/translated/ForeachTests.swift
+++ b/Tests/SwiftParserTest/translated/ForeachTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/GenericDisambiguationTests.swift b/Tests/SwiftParserTest/translated/GenericDisambiguationTests.swift
index 7d6c9000590..6856b335736 100644
--- a/Tests/SwiftParserTest/translated/GenericDisambiguationTests.swift
+++ b/Tests/SwiftParserTest/translated/GenericDisambiguationTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/GuardTests.swift b/Tests/SwiftParserTest/translated/GuardTests.swift
index 8a64b1c8031..d849e43bada 100644
--- a/Tests/SwiftParserTest/translated/GuardTests.swift
+++ b/Tests/SwiftParserTest/translated/GuardTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/GuardTopLevelTests.swift b/Tests/SwiftParserTest/translated/GuardTopLevelTests.swift
index f68f1c3212a..e59a0bc2fce 100644
--- a/Tests/SwiftParserTest/translated/GuardTopLevelTests.swift
+++ b/Tests/SwiftParserTest/translated/GuardTopLevelTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/HashbangLibraryTests.swift b/Tests/SwiftParserTest/translated/HashbangLibraryTests.swift
index e1543f440b8..562ebac8c96 100644
--- a/Tests/SwiftParserTest/translated/HashbangLibraryTests.swift
+++ b/Tests/SwiftParserTest/translated/HashbangLibraryTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/HashbangMainTests.swift b/Tests/SwiftParserTest/translated/HashbangMainTests.swift
index 80c1e77f700..90ac0a6c399 100644
--- a/Tests/SwiftParserTest/translated/HashbangMainTests.swift
+++ b/Tests/SwiftParserTest/translated/HashbangMainTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/IdentifiersTests.swift b/Tests/SwiftParserTest/translated/IdentifiersTests.swift
index fa38362d2c4..0d16fba95cb 100644
--- a/Tests/SwiftParserTest/translated/IdentifiersTests.swift
+++ b/Tests/SwiftParserTest/translated/IdentifiersTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/IfconfigExprTests.swift b/Tests/SwiftParserTest/translated/IfconfigExprTests.swift
index e2998bd508b..5282ea931b5 100644
--- a/Tests/SwiftParserTest/translated/IfconfigExprTests.swift
+++ b/Tests/SwiftParserTest/translated/IfconfigExprTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ImplicitGetterIncompleteTests.swift b/Tests/SwiftParserTest/translated/ImplicitGetterIncompleteTests.swift
index 27ab0351572..7b38f0672bb 100644
--- a/Tests/SwiftParserTest/translated/ImplicitGetterIncompleteTests.swift
+++ b/Tests/SwiftParserTest/translated/ImplicitGetterIncompleteTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/InitDeinitTests.swift b/Tests/SwiftParserTest/translated/InitDeinitTests.swift
index c6d1eba42f5..93a072ba194 100644
--- a/Tests/SwiftParserTest/translated/InitDeinitTests.swift
+++ b/Tests/SwiftParserTest/translated/InitDeinitTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/InvalidIfExprTests.swift b/Tests/SwiftParserTest/translated/InvalidIfExprTests.swift
index 84a59d837a8..65edbbbd13e 100644
--- a/Tests/SwiftParserTest/translated/InvalidIfExprTests.swift
+++ b/Tests/SwiftParserTest/translated/InvalidIfExprTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/InvalidStringInterpolationProtocolTests.swift b/Tests/SwiftParserTest/translated/InvalidStringInterpolationProtocolTests.swift
index b37b8e1dfc5..951cb0f955d 100644
--- a/Tests/SwiftParserTest/translated/InvalidStringInterpolationProtocolTests.swift
+++ b/Tests/SwiftParserTest/translated/InvalidStringInterpolationProtocolTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/InvalidTests.swift b/Tests/SwiftParserTest/translated/InvalidTests.swift
index 80291ea84e0..c83df60133c 100644
--- a/Tests/SwiftParserTest/translated/InvalidTests.swift
+++ b/Tests/SwiftParserTest/translated/InvalidTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/MatchingPatternsTests.swift b/Tests/SwiftParserTest/translated/MatchingPatternsTests.swift
index 9e8bf9a798d..c12529afebc 100644
--- a/Tests/SwiftParserTest/translated/MatchingPatternsTests.swift
+++ b/Tests/SwiftParserTest/translated/MatchingPatternsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/MetatypeObjectConversionTests.swift b/Tests/SwiftParserTest/translated/MetatypeObjectConversionTests.swift
index 2a999dc26eb..5d2a0caf947 100644
--- a/Tests/SwiftParserTest/translated/MetatypeObjectConversionTests.swift
+++ b/Tests/SwiftParserTest/translated/MetatypeObjectConversionTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/MoveExprTests.swift b/Tests/SwiftParserTest/translated/MoveExprTests.swift
index 742fb48fbc1..c2487db501a 100644
--- a/Tests/SwiftParserTest/translated/MoveExprTests.swift
+++ b/Tests/SwiftParserTest/translated/MoveExprTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/MultilineErrorsTests.swift b/Tests/SwiftParserTest/translated/MultilineErrorsTests.swift
index 6fc38647f46..52bd111d00b 100644
--- a/Tests/SwiftParserTest/translated/MultilineErrorsTests.swift
+++ b/Tests/SwiftParserTest/translated/MultilineErrorsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/MultilinePoundDiagnosticArgRdar41154797Tests.swift b/Tests/SwiftParserTest/translated/MultilinePoundDiagnosticArgRdar41154797Tests.swift
index e4382b5efc6..4a65f005e3c 100644
--- a/Tests/SwiftParserTest/translated/MultilinePoundDiagnosticArgRdar41154797Tests.swift
+++ b/Tests/SwiftParserTest/translated/MultilinePoundDiagnosticArgRdar41154797Tests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/NoimplicitcopyAttrTests.swift b/Tests/SwiftParserTest/translated/NoimplicitcopyAttrTests.swift
index 3082340edea..372d09f91b6 100644
--- a/Tests/SwiftParserTest/translated/NoimplicitcopyAttrTests.swift
+++ b/Tests/SwiftParserTest/translated/NoimplicitcopyAttrTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/NumberIdentifierErrorsTests.swift b/Tests/SwiftParserTest/translated/NumberIdentifierErrorsTests.swift
index 894486b7bb9..99010887d7d 100644
--- a/Tests/SwiftParserTest/translated/NumberIdentifierErrorsTests.swift
+++ b/Tests/SwiftParserTest/translated/NumberIdentifierErrorsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ObjcEnumTests.swift b/Tests/SwiftParserTest/translated/ObjcEnumTests.swift
index 86096c47c6c..23a526cffbd 100644
--- a/Tests/SwiftParserTest/translated/ObjcEnumTests.swift
+++ b/Tests/SwiftParserTest/translated/ObjcEnumTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ObjectLiteralsTests.swift b/Tests/SwiftParserTest/translated/ObjectLiteralsTests.swift
index 7b47e32dcb4..98301e41847 100644
--- a/Tests/SwiftParserTest/translated/ObjectLiteralsTests.swift
+++ b/Tests/SwiftParserTest/translated/ObjectLiteralsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/OperatorDeclDesignatedTypesTests.swift b/Tests/SwiftParserTest/translated/OperatorDeclDesignatedTypesTests.swift
index efa8c4f9b35..8fff6aa905c 100644
--- a/Tests/SwiftParserTest/translated/OperatorDeclDesignatedTypesTests.swift
+++ b/Tests/SwiftParserTest/translated/OperatorDeclDesignatedTypesTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/OperatorDeclTests.swift b/Tests/SwiftParserTest/translated/OperatorDeclTests.swift
index 9dd2c85e4ad..065c53c79c2 100644
--- a/Tests/SwiftParserTest/translated/OperatorDeclTests.swift
+++ b/Tests/SwiftParserTest/translated/OperatorDeclTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/OperatorsTests.swift b/Tests/SwiftParserTest/translated/OperatorsTests.swift
index 9c2e906432c..a97dce38a38 100644
--- a/Tests/SwiftParserTest/translated/OperatorsTests.swift
+++ b/Tests/SwiftParserTest/translated/OperatorsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/OptionalChainLvaluesTests.swift b/Tests/SwiftParserTest/translated/OptionalChainLvaluesTests.swift
index c5ee19594e5..a1a84bb60b0 100644
--- a/Tests/SwiftParserTest/translated/OptionalChainLvaluesTests.swift
+++ b/Tests/SwiftParserTest/translated/OptionalChainLvaluesTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/OptionalLvaluesTests.swift b/Tests/SwiftParserTest/translated/OptionalLvaluesTests.swift
index e92e923bba8..9a860e19a47 100644
--- a/Tests/SwiftParserTest/translated/OptionalLvaluesTests.swift
+++ b/Tests/SwiftParserTest/translated/OptionalLvaluesTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/OptionalTests.swift b/Tests/SwiftParserTest/translated/OptionalTests.swift
index 8ba2fff2a7f..3c6a3bda8a1 100644
--- a/Tests/SwiftParserTest/translated/OptionalTests.swift
+++ b/Tests/SwiftParserTest/translated/OptionalTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/OriginalDefinedInAttrTests.swift b/Tests/SwiftParserTest/translated/OriginalDefinedInAttrTests.swift
index d0ab838e5f3..36980bcd249 100644
--- a/Tests/SwiftParserTest/translated/OriginalDefinedInAttrTests.swift
+++ b/Tests/SwiftParserTest/translated/OriginalDefinedInAttrTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/PatternWithoutVariablesScriptTests.swift b/Tests/SwiftParserTest/translated/PatternWithoutVariablesScriptTests.swift
index 98f0753bacc..d779841abb4 100644
--- a/Tests/SwiftParserTest/translated/PatternWithoutVariablesScriptTests.swift
+++ b/Tests/SwiftParserTest/translated/PatternWithoutVariablesScriptTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/PatternWithoutVariablesTests.swift b/Tests/SwiftParserTest/translated/PatternWithoutVariablesTests.swift
index 7937285d384..266f6dab5fc 100644
--- a/Tests/SwiftParserTest/translated/PatternWithoutVariablesTests.swift
+++ b/Tests/SwiftParserTest/translated/PatternWithoutVariablesTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/PlaygroundLvaluesTests.swift b/Tests/SwiftParserTest/translated/PlaygroundLvaluesTests.swift
index 00f4f056a33..bcd1e889a93 100644
--- a/Tests/SwiftParserTest/translated/PlaygroundLvaluesTests.swift
+++ b/Tests/SwiftParserTest/translated/PlaygroundLvaluesTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/PoundAssertTests.swift b/Tests/SwiftParserTest/translated/PoundAssertTests.swift
index 86bb9d3ce02..d718266817f 100644
--- a/Tests/SwiftParserTest/translated/PoundAssertTests.swift
+++ b/Tests/SwiftParserTest/translated/PoundAssertTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/RawStringErrorsTests.swift b/Tests/SwiftParserTest/translated/RawStringErrorsTests.swift
index 05804e12764..9aa6718cc58 100644
--- a/Tests/SwiftParserTest/translated/RawStringErrorsTests.swift
+++ b/Tests/SwiftParserTest/translated/RawStringErrorsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/RawStringTests.swift b/Tests/SwiftParserTest/translated/RawStringTests.swift
index ef676095eee..005205f87a9 100644
--- a/Tests/SwiftParserTest/translated/RawStringTests.swift
+++ b/Tests/SwiftParserTest/translated/RawStringTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/RecoveryLibraryTests.swift b/Tests/SwiftParserTest/translated/RecoveryLibraryTests.swift
index 9623b03e629..45f4562e591 100644
--- a/Tests/SwiftParserTest/translated/RecoveryLibraryTests.swift
+++ b/Tests/SwiftParserTest/translated/RecoveryLibraryTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ResultBuilderTests.swift b/Tests/SwiftParserTest/translated/ResultBuilderTests.swift
index 9931383201e..92e7703fe06 100644
--- a/Tests/SwiftParserTest/translated/ResultBuilderTests.swift
+++ b/Tests/SwiftParserTest/translated/ResultBuilderTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/SelfRebindingTests.swift b/Tests/SwiftParserTest/translated/SelfRebindingTests.swift
index e1effdc694b..f18913eacf7 100644
--- a/Tests/SwiftParserTest/translated/SelfRebindingTests.swift
+++ b/Tests/SwiftParserTest/translated/SelfRebindingTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/SemicolonTests.swift b/Tests/SwiftParserTest/translated/SemicolonTests.swift
index 9a9bf74cfa9..b21b133d981 100644
--- a/Tests/SwiftParserTest/translated/SemicolonTests.swift
+++ b/Tests/SwiftParserTest/translated/SemicolonTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/StringLiteralEofTests.swift b/Tests/SwiftParserTest/translated/StringLiteralEofTests.swift
index a821ef4f2f2..6628189af6a 100644
--- a/Tests/SwiftParserTest/translated/StringLiteralEofTests.swift
+++ b/Tests/SwiftParserTest/translated/StringLiteralEofTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/SubscriptingTests.swift b/Tests/SwiftParserTest/translated/SubscriptingTests.swift
index 587d83ab42f..f4321aff112 100644
--- a/Tests/SwiftParserTest/translated/SubscriptingTests.swift
+++ b/Tests/SwiftParserTest/translated/SubscriptingTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/SuperTests.swift b/Tests/SwiftParserTest/translated/SuperTests.swift
index 8332f385644..97d169c73ed 100644
--- a/Tests/SwiftParserTest/translated/SuperTests.swift
+++ b/Tests/SwiftParserTest/translated/SuperTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/SwitchIncompleteTests.swift b/Tests/SwiftParserTest/translated/SwitchIncompleteTests.swift
index 382d134519b..0d4a494d394 100644
--- a/Tests/SwiftParserTest/translated/SwitchIncompleteTests.swift
+++ b/Tests/SwiftParserTest/translated/SwitchIncompleteTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/SwitchTests.swift b/Tests/SwiftParserTest/translated/SwitchTests.swift
index c18ad780a3a..6a85a9cf2cd 100644
--- a/Tests/SwiftParserTest/translated/SwitchTests.swift
+++ b/Tests/SwiftParserTest/translated/SwitchTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/ToplevelLibraryTests.swift b/Tests/SwiftParserTest/translated/ToplevelLibraryTests.swift
index fdee3285df0..670e7e4ed98 100644
--- a/Tests/SwiftParserTest/translated/ToplevelLibraryTests.swift
+++ b/Tests/SwiftParserTest/translated/ToplevelLibraryTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/TrailingClosuresTests.swift b/Tests/SwiftParserTest/translated/TrailingClosuresTests.swift
index 7561231aad9..377309cb2bc 100644
--- a/Tests/SwiftParserTest/translated/TrailingClosuresTests.swift
+++ b/Tests/SwiftParserTest/translated/TrailingClosuresTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/TrailingSemiTests.swift b/Tests/SwiftParserTest/translated/TrailingSemiTests.swift
index 8a9646f7b48..60d1b4d3160 100644
--- a/Tests/SwiftParserTest/translated/TrailingSemiTests.swift
+++ b/Tests/SwiftParserTest/translated/TrailingSemiTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/TryTests.swift b/Tests/SwiftParserTest/translated/TryTests.swift
index 84723d62310..6b14cbd2a37 100644
--- a/Tests/SwiftParserTest/translated/TryTests.swift
+++ b/Tests/SwiftParserTest/translated/TryTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/TypeExprTests.swift b/Tests/SwiftParserTest/translated/TypeExprTests.swift
index 4e5c89ee8d3..a240ed35b5f 100644
--- a/Tests/SwiftParserTest/translated/TypeExprTests.swift
+++ b/Tests/SwiftParserTest/translated/TypeExprTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/TypealiasTests.swift b/Tests/SwiftParserTest/translated/TypealiasTests.swift
index 9146a604a84..3c775b48d07 100644
--- a/Tests/SwiftParserTest/translated/TypealiasTests.swift
+++ b/Tests/SwiftParserTest/translated/TypealiasTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftParserTest/translated/UnclosedStringInterpolationTests.swift b/Tests/SwiftParserTest/translated/UnclosedStringInterpolationTests.swift
index 2f5f5f14c1b..3c8236edb9f 100644
--- a/Tests/SwiftParserTest/translated/UnclosedStringInterpolationTests.swift
+++ b/Tests/SwiftParserTest/translated/UnclosedStringInterpolationTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftRefactorTest/FormatRawStringLiteral.swift b/Tests/SwiftRefactorTest/FormatRawStringLiteral.swift
index c59cc4e5c5e..ea8a94fbba0 100644
--- a/Tests/SwiftRefactorTest/FormatRawStringLiteral.swift
+++ b/Tests/SwiftRefactorTest/FormatRawStringLiteral.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftRefactorTest/IntegerLiteralUtilities.swift b/Tests/SwiftRefactorTest/IntegerLiteralUtilities.swift
index bd327d3b3bf..840bd4c12ec 100644
--- a/Tests/SwiftRefactorTest/IntegerLiteralUtilities.swift
+++ b/Tests/SwiftRefactorTest/IntegerLiteralUtilities.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftRefactorTest/MigrateToNewIfLetSyntax.swift b/Tests/SwiftRefactorTest/MigrateToNewIfLetSyntax.swift
index 3f284c3b452..c76aae41f4c 100644
--- a/Tests/SwiftRefactorTest/MigrateToNewIfLetSyntax.swift
+++ b/Tests/SwiftRefactorTest/MigrateToNewIfLetSyntax.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftRefactorTest/OpaqueParameterToGeneric.swift b/Tests/SwiftRefactorTest/OpaqueParameterToGeneric.swift
index cf7078669f1..3fab8c75a54 100644
--- a/Tests/SwiftRefactorTest/OpaqueParameterToGeneric.swift
+++ b/Tests/SwiftRefactorTest/OpaqueParameterToGeneric.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftRefactorTest/ReformatIntegerLiteral.swift b/Tests/SwiftRefactorTest/ReformatIntegerLiteral.swift
index f226cab677a..f66c14d3922 100644
--- a/Tests/SwiftRefactorTest/ReformatIntegerLiteral.swift
+++ b/Tests/SwiftRefactorTest/ReformatIntegerLiteral.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/Assertions.swift b/Tests/SwiftSyntaxBuilderTest/Assertions.swift
index 7030eb620cf..4c0b1d7defc 100644
--- a/Tests/SwiftSyntaxBuilderTest/Assertions.swift
+++ b/Tests/SwiftSyntaxBuilderTest/Assertions.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/BooleanLiteralTests.swift b/Tests/SwiftSyntaxBuilderTest/BooleanLiteralTests.swift
index 9828d0a0f40..92d92674ecf 100644
--- a/Tests/SwiftSyntaxBuilderTest/BooleanLiteralTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/BooleanLiteralTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/ClassDeclSyntaxTests.swift b/Tests/SwiftSyntaxBuilderTest/ClassDeclSyntaxTests.swift
index 3b9a1226d3b..844016d0505 100644
--- a/Tests/SwiftSyntaxBuilderTest/ClassDeclSyntaxTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/ClassDeclSyntaxTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/ClosureExprTests.swift b/Tests/SwiftSyntaxBuilderTest/ClosureExprTests.swift
index 1f2040c7504..439c8553aaa 100644
--- a/Tests/SwiftSyntaxBuilderTest/ClosureExprTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/ClosureExprTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/CollectionNodeFlatteningTests.swift b/Tests/SwiftSyntaxBuilderTest/CollectionNodeFlatteningTests.swift
index f1dfcdcb739..fce40779cb2 100644
--- a/Tests/SwiftSyntaxBuilderTest/CollectionNodeFlatteningTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/CollectionNodeFlatteningTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/CustomAttributeTests.swift b/Tests/SwiftSyntaxBuilderTest/CustomAttributeTests.swift
index 7c0990a695e..6c1dc8fe61c 100644
--- a/Tests/SwiftSyntaxBuilderTest/CustomAttributeTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/CustomAttributeTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/DoStmtTests.swift b/Tests/SwiftSyntaxBuilderTest/DoStmtTests.swift
index c732373c2b6..19e4a4d86ac 100644
--- a/Tests/SwiftSyntaxBuilderTest/DoStmtTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/DoStmtTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/EnumCaseElementTests.swift b/Tests/SwiftSyntaxBuilderTest/EnumCaseElementTests.swift
index 175cd48d9b0..046e61d83df 100644
--- a/Tests/SwiftSyntaxBuilderTest/EnumCaseElementTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/EnumCaseElementTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/ExprListTests.swift b/Tests/SwiftSyntaxBuilderTest/ExprListTests.swift
index 3c4aa79ba67..8c1645bf70d 100644
--- a/Tests/SwiftSyntaxBuilderTest/ExprListTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/ExprListTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/ExtensionDeclTests.swift b/Tests/SwiftSyntaxBuilderTest/ExtensionDeclTests.swift
index e723fa4e71c..09c4ec46ded 100644
--- a/Tests/SwiftSyntaxBuilderTest/ExtensionDeclTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/ExtensionDeclTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/FloatLiteralTests.swift b/Tests/SwiftSyntaxBuilderTest/FloatLiteralTests.swift
index 30cbf52feb4..f69b5cd543b 100644
--- a/Tests/SwiftSyntaxBuilderTest/FloatLiteralTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/FloatLiteralTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/FunctionTests.swift b/Tests/SwiftSyntaxBuilderTest/FunctionTests.swift
index c5402f3650f..9738cd876a8 100644
--- a/Tests/SwiftSyntaxBuilderTest/FunctionTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/FunctionTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/IfStmtTests.swift b/Tests/SwiftSyntaxBuilderTest/IfStmtTests.swift
index f604869e98b..170b39330d6 100644
--- a/Tests/SwiftSyntaxBuilderTest/IfStmtTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/IfStmtTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/ImportTests.swift b/Tests/SwiftSyntaxBuilderTest/ImportTests.swift
index eece28a4ecd..7270d1da5c9 100644
--- a/Tests/SwiftSyntaxBuilderTest/ImportTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/ImportTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/InitializerDeclTests.swift b/Tests/SwiftSyntaxBuilderTest/InitializerDeclTests.swift
index 25e139f1ec9..2ca6bde8015 100644
--- a/Tests/SwiftSyntaxBuilderTest/InitializerDeclTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/InitializerDeclTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/IntegerLiteralTests.swift b/Tests/SwiftSyntaxBuilderTest/IntegerLiteralTests.swift
index c3bffae654f..c2f1491dfdd 100644
--- a/Tests/SwiftSyntaxBuilderTest/IntegerLiteralTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/IntegerLiteralTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/ProtocolDeclTests.swift b/Tests/SwiftSyntaxBuilderTest/ProtocolDeclTests.swift
index fc4529a9698..0d803aa6e16 100644
--- a/Tests/SwiftSyntaxBuilderTest/ProtocolDeclTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/ProtocolDeclTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/ReturnStmsTests.swift b/Tests/SwiftSyntaxBuilderTest/ReturnStmsTests.swift
index 0ba0f0d7546..239253fed33 100644
--- a/Tests/SwiftSyntaxBuilderTest/ReturnStmsTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/ReturnStmsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/SourceFileTests.swift b/Tests/SwiftSyntaxBuilderTest/SourceFileTests.swift
index 536112841bd..0e9f35417ee 100644
--- a/Tests/SwiftSyntaxBuilderTest/SourceFileTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/SourceFileTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/StringInterpolationTests.swift b/Tests/SwiftSyntaxBuilderTest/StringInterpolationTests.swift
index 234c8ba9ea3..e4d7017ee8c 100644
--- a/Tests/SwiftSyntaxBuilderTest/StringInterpolationTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/StringInterpolationTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/StringLiteralTests.swift b/Tests/SwiftSyntaxBuilderTest/StringLiteralTests.swift
index a69b7ac83c6..b35f78ee922 100644
--- a/Tests/SwiftSyntaxBuilderTest/StringLiteralTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/StringLiteralTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/StructTests.swift b/Tests/SwiftSyntaxBuilderTest/StructTests.swift
index 04ef14ad11d..f15a94c304b 100644
--- a/Tests/SwiftSyntaxBuilderTest/StructTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/StructTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/SwitchCaseLabelSyntaxTests.swift b/Tests/SwiftSyntaxBuilderTest/SwitchCaseLabelSyntaxTests.swift
index 1358a93185a..61cd1118202 100644
--- a/Tests/SwiftSyntaxBuilderTest/SwitchCaseLabelSyntaxTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/SwitchCaseLabelSyntaxTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/SwitchTests.swift b/Tests/SwiftSyntaxBuilderTest/SwitchTests.swift
index 6a46f480cfc..2ce78850ecf 100644
--- a/Tests/SwiftSyntaxBuilderTest/SwitchTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/SwitchTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/TernaryExprTests.swift b/Tests/SwiftSyntaxBuilderTest/TernaryExprTests.swift
index b3a3796628f..e300afa011a 100644
--- a/Tests/SwiftSyntaxBuilderTest/TernaryExprTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/TernaryExprTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/TriviaTests.swift b/Tests/SwiftSyntaxBuilderTest/TriviaTests.swift
index 235b25e32f6..b20d4811a0e 100644
--- a/Tests/SwiftSyntaxBuilderTest/TriviaTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/TriviaTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/TupleTests.swift b/Tests/SwiftSyntaxBuilderTest/TupleTests.swift
index 941d34c00db..d60082e5cff 100644
--- a/Tests/SwiftSyntaxBuilderTest/TupleTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/TupleTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxBuilderTest/VariableTests.swift b/Tests/SwiftSyntaxBuilderTest/VariableTests.swift
index bc0f8b602b2..fefd542c3ca 100644
--- a/Tests/SwiftSyntaxBuilderTest/VariableTests.swift
+++ b/Tests/SwiftSyntaxBuilderTest/VariableTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxMacrosTest/MacroSystemTests.swift b/Tests/SwiftSyntaxMacrosTest/MacroSystemTests.swift
index 4b377090538..7ac10adfe7b 100644
--- a/Tests/SwiftSyntaxMacrosTest/MacroSystemTests.swift
+++ b/Tests/SwiftSyntaxMacrosTest/MacroSystemTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxParserTest/AbsolutePositionTests.swift b/Tests/SwiftSyntaxParserTest/AbsolutePositionTests.swift
index c5f74bc211f..d73d06f6809 100644
--- a/Tests/SwiftSyntaxParserTest/AbsolutePositionTests.swift
+++ b/Tests/SwiftSyntaxParserTest/AbsolutePositionTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxParserTest/IncrementalParsingTests.swift b/Tests/SwiftSyntaxParserTest/IncrementalParsingTests.swift
index 6d5aee07e9e..bf0b84c332d 100644
--- a/Tests/SwiftSyntaxParserTest/IncrementalParsingTests.swift
+++ b/Tests/SwiftSyntaxParserTest/IncrementalParsingTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxParserTest/ParseFileTests.swift b/Tests/SwiftSyntaxParserTest/ParseFileTests.swift
index fa6bc40a05d..38394c59fc5 100644
--- a/Tests/SwiftSyntaxParserTest/ParseFileTests.swift
+++ b/Tests/SwiftSyntaxParserTest/ParseFileTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxParserTest/SyntaxComparisonTests.swift b/Tests/SwiftSyntaxParserTest/SyntaxComparisonTests.swift
index 2058c7b529d..89bf4a644b9 100644
--- a/Tests/SwiftSyntaxParserTest/SyntaxComparisonTests.swift
+++ b/Tests/SwiftSyntaxParserTest/SyntaxComparisonTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxParserTest/SyntaxTests.swift b/Tests/SwiftSyntaxParserTest/SyntaxTests.swift
index 267aeea0386..cd6a24e5d49 100644
--- a/Tests/SwiftSyntaxParserTest/SyntaxTests.swift
+++ b/Tests/SwiftSyntaxParserTest/SyntaxTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxParserTest/SyntaxVisitorTests.swift b/Tests/SwiftSyntaxParserTest/SyntaxVisitorTests.swift
index 1d6e148c619..d047cb954cc 100644
--- a/Tests/SwiftSyntaxParserTest/SyntaxVisitorTests.swift
+++ b/Tests/SwiftSyntaxParserTest/SyntaxVisitorTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxParserTest/TokenTest.swift b/Tests/SwiftSyntaxParserTest/TokenTest.swift
index b6a2692bc73..5cd71f57f57 100644
--- a/Tests/SwiftSyntaxParserTest/TokenTest.swift
+++ b/Tests/SwiftSyntaxParserTest/TokenTest.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/BumpPtrAllocatorTests.swift b/Tests/SwiftSyntaxTest/BumpPtrAllocatorTests.swift
index b11a54dafaa..94425a82965 100644
--- a/Tests/SwiftSyntaxTest/BumpPtrAllocatorTests.swift
+++ b/Tests/SwiftSyntaxTest/BumpPtrAllocatorTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/CustomReflectableTests.swift b/Tests/SwiftSyntaxTest/CustomReflectableTests.swift
index 46ab5273dd8..7f09bcd2e41 100644
--- a/Tests/SwiftSyntaxTest/CustomReflectableTests.swift
+++ b/Tests/SwiftSyntaxTest/CustomReflectableTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/MemoryLayoutTest.swift b/Tests/SwiftSyntaxTest/MemoryLayoutTest.swift
index 5ab289b18d1..a4acd722ab2 100644
--- a/Tests/SwiftSyntaxTest/MemoryLayoutTest.swift
+++ b/Tests/SwiftSyntaxTest/MemoryLayoutTest.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/MultithreadingTests.swift b/Tests/SwiftSyntaxTest/MultithreadingTests.swift
index eab0ec2793b..a87e9bd71c9 100644
--- a/Tests/SwiftSyntaxTest/MultithreadingTests.swift
+++ b/Tests/SwiftSyntaxTest/MultithreadingTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/RawSyntaxTests.swift b/Tests/SwiftSyntaxTest/RawSyntaxTests.swift
index 15e9521f849..c6f1cf49b4b 100644
--- a/Tests/SwiftSyntaxTest/RawSyntaxTests.swift
+++ b/Tests/SwiftSyntaxTest/RawSyntaxTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/SequentialToConcurrentEditTranslationTests.swift b/Tests/SwiftSyntaxTest/SequentialToConcurrentEditTranslationTests.swift
index c1f4a31a3a3..518876802f1 100644
--- a/Tests/SwiftSyntaxTest/SequentialToConcurrentEditTranslationTests.swift
+++ b/Tests/SwiftSyntaxTest/SequentialToConcurrentEditTranslationTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/SyntaxChildrenTests.swift b/Tests/SwiftSyntaxTest/SyntaxChildrenTests.swift
index 17d398e2367..09caf2e8f8c 100644
--- a/Tests/SwiftSyntaxTest/SyntaxChildrenTests.swift
+++ b/Tests/SwiftSyntaxTest/SyntaxChildrenTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/SyntaxCollectionsTests.swift b/Tests/SwiftSyntaxTest/SyntaxCollectionsTests.swift
index c939bd7c498..7646f9bcd19 100644
--- a/Tests/SwiftSyntaxTest/SyntaxCollectionsTests.swift
+++ b/Tests/SwiftSyntaxTest/SyntaxCollectionsTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/SyntaxCreationTests.swift b/Tests/SwiftSyntaxTest/SyntaxCreationTests.swift
index 360099d2730..c8e67e50c30 100644
--- a/Tests/SwiftSyntaxTest/SyntaxCreationTests.swift
+++ b/Tests/SwiftSyntaxTest/SyntaxCreationTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/SyntaxTests.swift b/Tests/SwiftSyntaxTest/SyntaxTests.swift
index 282c219eed9..26da15a76fe 100644
--- a/Tests/SwiftSyntaxTest/SyntaxTests.swift
+++ b/Tests/SwiftSyntaxTest/SyntaxTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/SyntaxTextTests.swift b/Tests/SwiftSyntaxTest/SyntaxTextTests.swift
index dc95f3303fc..8f5509b8ca3 100644
--- a/Tests/SwiftSyntaxTest/SyntaxTextTests.swift
+++ b/Tests/SwiftSyntaxTest/SyntaxTextTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/SyntaxTreeModifierTests.swift b/Tests/SwiftSyntaxTest/SyntaxTreeModifierTests.swift
index 858518b7706..fe773007f7a 100644
--- a/Tests/SwiftSyntaxTest/SyntaxTreeModifierTests.swift
+++ b/Tests/SwiftSyntaxTest/SyntaxTreeModifierTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/TriviaTests.swift b/Tests/SwiftSyntaxTest/TriviaTests.swift
index b798e76156d..c00863bf1ea 100644
--- a/Tests/SwiftSyntaxTest/TriviaTests.swift
+++ b/Tests/SwiftSyntaxTest/TriviaTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/Tests/SwiftSyntaxTest/VisitorTests.swift b/Tests/SwiftSyntaxTest/VisitorTests.swift
index de3eaae4daa..ac481ac229d 100644
--- a/Tests/SwiftSyntaxTest/VisitorTests.swift
+++ b/Tests/SwiftSyntaxTest/VisitorTests.swift
@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
-// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
diff --git a/cmake/modules/AddSwiftHostLibrary.cmake b/cmake/modules/AddSwiftHostLibrary.cmake
index c02a159f372..7e53ecb4c62 100644
--- a/cmake/modules/AddSwiftHostLibrary.cmake
+++ b/cmake/modules/AddSwiftHostLibrary.cmake
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
diff --git a/lit_tests/lit.cfg b/lit_tests/lit.cfg
index d598b5f9722..f256cee13d2 100644
--- a/lit_tests/lit.cfg
+++ b/lit_tests/lit.cfg
@@ -2,7 +2,7 @@
#
# This source file is part of the Swift.org open source project
#
-# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
+# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information