diff --git a/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift b/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift index c732acc97b4..37bb72b5137 100644 --- a/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift @@ -51,105 +51,105 @@ public let ATTRIBUTE_NODES: [Node] = [ parserFunction: "parseAttribute", children: [ Child( - name: "AtSign", - deprecatedName: "AtSignToken", + name: "atSign", + deprecatedName: "atSignToken", kind: .token(choices: [.token(.atSign)]), documentation: "The `@` sign." ), Child( - name: "AttributeName", + name: "attributeName", kind: .node(kind: .type), nameForDiagnostics: "name", documentation: "The name of the attribute." ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]), documentation: "If the attribute takes arguments, the opening parenthesis.", isOptional: true ), Child( - name: "Arguments", - deprecatedName: "Argument", + name: "arguments", + deprecatedName: "argument", kind: .nodeChoices(choices: [ Child( - name: "ArgumentList", + name: "argumentList", kind: .node(kind: .labeledExprList) ), Child( - name: "Token", + name: "token", kind: .node(kind: .token) ), Child( - name: "String", + name: "string", kind: .node(kind: .stringLiteralExpr) ), Child( - name: "Availability", + name: "availability", kind: .node(kind: .availabilityArgumentList) ), Child( - name: "SpecializeArguments", + name: "specializeArguments", kind: .node(kind: .specializeAttributeArgumentList) ), Child( - name: "ObjCName", + name: "objCName", kind: .node(kind: .objCSelectorPieceList) ), Child( - name: "ImplementsArguments", + name: "implementsArguments", kind: .node(kind: .implementsAttributeArguments) ), Child( - name: "DifferentiableArguments", + name: "differentiableArguments", kind: .node(kind: .differentiableAttributeArguments) ), Child( - name: "DerivativeRegistrationArguments", + name: "derivativeRegistrationArguments", kind: .node(kind: .derivativeAttributeArguments) ), Child( - name: "BackDeployedArguments", + name: "backDeployedArguments", kind: .node(kind: .backDeployedAttributeArguments) ), Child( - name: "ConventionArguments", + name: "conventionArguments", kind: .node(kind: .conventionAttributeArguments) ), Child( - name: "ConventionWitnessMethodArguments", + name: "conventionWitnessMethodArguments", kind: .node(kind: .conventionWitnessMethodAttributeArguments) ), Child( - name: "OpaqueReturnTypeOfAttributeArguments", + name: "opaqueReturnTypeOfAttributeArguments", kind: .node(kind: .opaqueReturnTypeOfAttributeArguments) ), Child( - name: "ExposeAttributeArguments", + name: "exposeAttributeArguments", kind: .node(kind: .exposeAttributeArguments) ), Child( - name: "OriginallyDefinedInArguments", + name: "originallyDefinedInArguments", kind: .node(kind: .originallyDefinedInAttributeArguments) ), Child( - name: "UnderscorePrivateAttributeArguments", + name: "underscorePrivateAttributeArguments", kind: .node(kind: .underscorePrivateAttributeArguments) ), Child( - name: "DynamicReplacementArguments", + name: "dynamicReplacementArguments", kind: .node(kind: .dynamicReplacementAttributeArguments) ), Child( - name: "UnavailableFromAsyncArguments", + name: "unavailableFromAsyncArguments", kind: .node(kind: .unavailableFromAsyncAttributeArguments) ), Child( - name: "EffectsArguments", + name: "effectsArguments", kind: .node(kind: .effectsAttributeArgumentList) ), Child( - name: "DocumentationArguments", + name: "documentationArguments", kind: .node(kind: .documentationAttributeArgumentList) ), ]), @@ -162,7 +162,7 @@ public let ATTRIBUTE_NODES: [Node] = [ isOptional: true ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]), documentation: "If the attribute takes arguments, the closing parenthesis.", isOptional: true @@ -177,24 +177,24 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The availability argument for the _specialize attribute", children: [ Child( - name: "AvailabilityLabel", - deprecatedName: "Label", + name: "availabilityLabel", + deprecatedName: "label", kind: .token(choices: [.keyword(text: "availability")]), nameForDiagnostics: "label", documentation: "The label of the argument" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), documentation: "The colon separating the label and the value" ), Child( - name: "AvailabilityArguments", - deprecatedName: "AvailabilityList", + name: "availabilityArguments", + deprecatedName: "availabilityList", kind: .collection(kind: .availabilityArgumentList, collectionElementName: "AvailabilityArgument", deprecatedCollectionElementName: "Availability") ), Child( - name: "Semicolon", + name: "semicolon", kind: .token(choices: [.token(.semicolon)]) ), ] @@ -209,12 +209,12 @@ public let ATTRIBUTE_NODES: [Node] = [ traits: ["WithTrailingComma"], children: [ Child( - name: "PlatformVersion", - deprecatedName: "AvailabilityVersionRestriction", + name: "platformVersion", + deprecatedName: "availabilityVersionRestriction", kind: .node(kind: .platformVersion) ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), documentation: "A trailing comma if the argument is followed by another argument", isOptional: true @@ -240,18 +240,18 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "A collection of arguments for the `@backDeployed` attribute", children: [ Child( - name: "BeforeLabel", + name: "beforeLabel", kind: .token(choices: [.keyword(text: "before")]), documentation: "The \"before\" label." ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), documentation: "The colon separating \"before\" and the parameter list." ), Child( - name: "Platforms", - deprecatedName: "VersionList", + name: "platforms", + deprecatedName: "versionList", kind: .collection(kind: .platformVersionItemList, collectionElementName: "Platform", deprecatedCollectionElementName: "Availability"), documentation: "The list of OS versions in which the declaration became ABI stable." ), @@ -266,27 +266,27 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The arguments for the '@convention(...)'.", children: [ Child( - name: "ConventionLabel", + name: "conventionLabel", kind: .token(choices: [.token(.identifier)]), documentation: "The convention label." ), Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]), isOptional: true ), Child( - name: "CTypeLabel", + name: "cTypeLabel", kind: .token(choices: [.keyword(text: "cType")]), isOptional: true ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), isOptional: true ), Child( - name: "CTypeString", + name: "cTypeString", kind: .node(kind: .stringLiteralExpr), isOptional: true ), @@ -301,15 +301,15 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The arguments for the '@convention(witness_method: ...)'.", children: [ Child( - name: "WitnessMethodLabel", + name: "witnessMethodLabel", kind: .token(choices: [.keyword(text: "witness_method")]) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "ProtocolName", + name: "protocolName", kind: .token(choices: [.token(.identifier)]) ), ] @@ -329,41 +329,41 @@ public let ATTRIBUTE_NODES: [Node] = [ "The arguments for the '@derivative(of:)' and '@transpose(of:)' attributes: the 'of:' label, the original declaration name, and an optional differentiability parameter list.", children: [ Child( - name: "OfLabel", + name: "ofLabel", kind: .token(choices: [.keyword(text: "of")]), documentation: "The \"of\" label." ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), documentation: "The colon separating the \"of\" label and the original declaration name." ), Child( - name: "OriginalDeclName", + name: "originalDeclName", kind: .node(kind: .expr), documentation: "The referenced original declaration name." ), Child( - name: "Period", + name: "period", kind: .token(choices: [.token(.period)]), documentation: "The period separating the original declaration name and the accessor name.", isOptional: true ), Child( - name: "AccessorSpecifier", - deprecatedName: "AccessorKind", + name: "accessorSpecifier", + deprecatedName: "accessorKind", kind: .token(choices: [.keyword(text: "get"), .keyword(text: "set")]), documentation: "The accessor name.", isOptional: true ), Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]), isOptional: true ), Child( - name: "Arguments", - deprecatedName: "DiffParams", + name: "arguments", + deprecatedName: "diffParams", kind: .node(kind: .differentiabilityWithRespectToArgument), isOptional: true ), @@ -390,12 +390,12 @@ public let ATTRIBUTE_NODES: [Node] = [ ], children: [ Child( - name: "Argument", - deprecatedName: "Parameter", + name: "argument", + deprecatedName: "parameter", kind: .token(choices: [.token(.identifier), .token(.integerLiteral), .keyword(text: "self")]) ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -411,27 +411,27 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "A clause containing differentiability parameters.", children: [ Child( - name: "WrtLabel", + name: "wrtLabel", kind: .token(choices: [.keyword(text: "wrt")]), documentation: "The \"wrt\" label." ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), documentation: "The colon separating \"wrt\" and the parameter list." ), Child( - name: "Arguments", - deprecatedName: "Parameters", + name: "arguments", + deprecatedName: "parameters", kind: .nodeChoices(choices: [ Child( - name: "Argument", - deprecatedName: "Parameter", + name: "argument", + deprecatedName: "parameter", kind: .node(kind: .differentiabilityArgument) ), Child( - name: "ArgumentList", - deprecatedName: "ParameterList", + name: "argumentList", + deprecatedName: "parameterList", kind: .node(kind: .differentiabilityArguments) ), ]), @@ -448,17 +448,17 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The differentiability arguments.", children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Arguments", - deprecatedName: "DifferentiabilityParameters", + name: "arguments", + deprecatedName: "differentiabilityParameters", kind: .collection(kind: .differentiabilityArgumentList, collectionElementName: "Argument"), documentation: "The parameters for differentiation." ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -476,34 +476,34 @@ public let ATTRIBUTE_NODES: [Node] = [ "The arguments for the `@differentiable` attribute: an optional differentiability kind, an optional differentiability parameter clause, and an optional 'where' clause.", children: [ Child( - name: "KindSpecifier", - deprecatedName: "DiffKind", + name: "kindSpecifier", + deprecatedName: "diffKind", kind: .token(choices: [.keyword(text: "_forward"), .keyword(text: "reverse"), .keyword(text: "_linear")]), isOptional: true ), Child( - name: "KindSpecifierComma", - deprecatedName: "DiffKindComma", + name: "kindSpecifierComma", + deprecatedName: "diffKindComma", kind: .token(choices: [.token(.comma)]), documentation: "The comma following the differentiability kind, if it exists.", isOptional: true ), Child( - name: "Arguments", - deprecatedName: "DiffParams", + name: "arguments", + deprecatedName: "diffParams", kind: .node(kind: .differentiabilityWithRespectToArgument), isOptional: true ), Child( - name: "ArgumentsComma", - deprecatedName: "DiffParamsComma", + name: "argumentsComma", + deprecatedName: "diffParamsComma", kind: .token(choices: [.token(.comma)]), documentation: "The comma following the differentiability arguments clause, if it exists.", isOptional: true ), Child( - name: "GenericWhereClause", - deprecatedName: "WhereClause", + name: "genericWhereClause", + deprecatedName: "whereClause", kind: .node(kind: .genericWhereClause), documentation: "A `where` clause that places additional constraints on generic parameters like `where T: Differentiable`.", isOptional: true @@ -520,19 +520,19 @@ public let ATTRIBUTE_NODES: [Node] = [ ], children: [ Child( - name: "Label", + name: "label", kind: .token(choices: [.keyword(text: "visibility"), .keyword(text: "metadata")]), nameForDiagnostics: "label" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Value", + name: "value", kind: .nodeChoices(choices: [ Child( - name: "Token", + name: "token", kind: .token(choices: [ .token(.identifier), .keyword(text: "private"), @@ -543,13 +543,13 @@ public let ATTRIBUTE_NODES: [Node] = [ ]) ), // Keywords can be: public, internal, private, fileprivate, open Child( - name: "String", + name: "string", kind: .node(kind: .stringLiteralExpr) ), ]) ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), documentation: "A trailing comma if this argument is followed by another one", isOptional: true @@ -572,16 +572,16 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The arguments for the '@_dynamicReplacement' attribute", children: [ Child( - name: "ForLabel", + name: "forLabel", kind: .token(choices: [.keyword(text: "for")], requiresTrailingSpace: false) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "DeclName", - deprecatedName: "Declname", + name: "declName", + deprecatedName: "declname", kind: .node(kind: .declReferenceExpr) ), ] @@ -602,16 +602,16 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The arguments for the '@_expose' attribute", children: [ Child( - name: "Language", + name: "language", kind: .node(kind: .token) ), Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]), isOptional: true ), Child( - name: "CxxName", + name: "cxxName", kind: .node(kind: .stringLiteralExpr), isOptional: true ), @@ -628,19 +628,19 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The arguments for the `@_implements` attribute of the form `Type, methodName(arg1Label:arg2Label:)`", children: [ Child( - name: "Type", + name: "type", kind: .node(kind: .type), nameForDiagnostics: "type", documentation: "The type for which the method with this attribute implements a requirement." ), Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]), documentation: "The comma separating the type and method name" ), Child( - name: "DeclName", - deprecatedName: "Declname", + name: "declName", + deprecatedName: "declname", kind: .node(kind: .declReferenceExpr), nameForDiagnostics: "declaration name", documentation: "The value for this argument" @@ -660,7 +660,7 @@ public let ATTRIBUTE_NODES: [Node] = [ ], children: [ Child( - name: "Label", + name: "label", kind: .token(choices: [ .keyword(text: "target"), .keyword(text: "availability"), @@ -674,18 +674,18 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The label of the argument" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), documentation: "The colon separating the label and the value" ), Child( - name: "Value", + name: "value", kind: .node(kind: .token), nameForDiagnostics: "value", documentation: "The value for this argument" ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), documentation: "A trailing comma if this argument is followed by another one", isOptional: true @@ -702,13 +702,13 @@ public let ATTRIBUTE_NODES: [Node] = [ "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", children: [ Child( - name: "Name", + name: "name", kind: .node(kind: .token), nameForDiagnostics: "name", isOptional: true ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), isOptional: true ), @@ -731,16 +731,16 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The arguments for the '@_opaqueReturnTypeOf()'.", children: [ Child( - name: "MangledName", + name: "mangledName", kind: .node(kind: .stringLiteralExpr), documentation: "The mangled name of a declaration." ), Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]) ), Child( - name: "Ordinal", + name: "ordinal", kind: .token(choices: [.token(.integerLiteral)]), documentation: "The ordinal corresponding to the 'some' keyword that introduced this opaque type." ), @@ -754,23 +754,23 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The arguments for the '@_originallyDefinedIn' attribute", children: [ Child( - name: "ModuleLabel", + name: "moduleLabel", kind: .token(choices: [.keyword(text: "module")]) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "ModuleName", + name: "moduleName", kind: .node(kind: .stringLiteralExpr) ), Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]) ), Child( - name: "Platforms", + name: "platforms", kind: .collection(kind: .platformVersionItemList, collectionElementName: "Platform") ), ] @@ -801,26 +801,26 @@ public let ATTRIBUTE_NODES: [Node] = [ ], children: [ Child( - name: "TargetLabel", - deprecatedName: "Label", + name: "targetLabel", + deprecatedName: "label", kind: .token(choices: [.keyword(text: "target")]), nameForDiagnostics: "label", documentation: "The label of the argument" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), documentation: "The colon separating the label and the value" ), Child( - name: "DeclName", - deprecatedName: "Declname", + name: "declName", + deprecatedName: "declname", kind: .node(kind: .declReferenceExpr), nameForDiagnostics: "declaration name", documentation: "The value for this argument" ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), documentation: "A trailing comma if this argument is followed by another one", isOptional: true @@ -835,15 +835,15 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The arguments for the '@_unavailableFromAsync' attribute", children: [ Child( - name: "MessageLabel", + name: "messageLabel", kind: .token(choices: [.keyword(text: "message")]) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Message", + name: "message", kind: .node(kind: .stringLiteralExpr) ), ] @@ -856,15 +856,15 @@ public let ATTRIBUTE_NODES: [Node] = [ documentation: "The arguments for the '@_private' attribute", children: [ Child( - name: "SourceFileLabel", + name: "sourceFileLabel", kind: .token(choices: [.keyword(text: "sourceFile")]) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Filename", + name: "filename", kind: .node(kind: .stringLiteralExpr) ), ] diff --git a/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift b/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift index 31a139d954d..e2097076c62 100644 --- a/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift @@ -24,11 +24,11 @@ public let AVAILABILITY_NODES: [Node] = [ traits: ["WithTrailingComma"], children: [ Child( - name: "Argument", - deprecatedName: "Entry", + name: "argument", + deprecatedName: "entry", kind: .nodeChoices(choices: [ Child( - name: "Token", + name: "token", kind: .token( choices: [.token(.binaryOperator), .token(.identifier)], requiresLeadingSpace: false, @@ -36,18 +36,18 @@ public let AVAILABILITY_NODES: [Node] = [ ) ), Child( - name: "AvailabilityVersionRestriction", + name: "availabilityVersionRestriction", kind: .node(kind: .platformVersion) ), Child( - name: "AvailabilityLabeledArgument", + name: "availabilityLabeledArgument", kind: .node(kind: .availabilityLabeledArgument) ), ]), documentation: "The actual argument" ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), documentation: "A trailing comma if the argument is followed by another argument", isOptional: true @@ -64,7 +64,7 @@ public let AVAILABILITY_NODES: [Node] = [ documentation: "An argument to an `@available` attribute that consists of a label and a value, e.g. `message: \"This has been deprecated\"`.", children: [ Child( - name: "Label", + name: "label", kind: .token(choices: [ .keyword(text: "message"), .keyword(text: "renamed"), @@ -76,19 +76,19 @@ public let AVAILABILITY_NODES: [Node] = [ documentation: "The label of the argument" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), documentation: "The colon separating label and value" ), Child( - name: "Value", + name: "value", kind: .nodeChoices(choices: [ Child( - name: "String", + name: "string", kind: .node(kind: .simpleStringLiteralExpr) ), Child( - name: "Version", + name: "version", kind: .node(kind: .versionTuple) ), ]), @@ -115,14 +115,14 @@ public let AVAILABILITY_NODES: [Node] = [ documentation: "An argument to `@available` that restricts the availability on a certain platform to a version, e.g. `iOS 10` or `swift 3.4`.", children: [ Child( - name: "Platform", + name: "platform", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "platform", documentation: "The name of the OS on which the availability should be restricted or 'swift' if the availability should be restricted based on a Swift version." ), Child( - name: "Version", + name: "version", kind: .node(kind: .versionTuple), nameForDiagnostics: "version", documentation: """ @@ -145,12 +145,12 @@ public let AVAILABILITY_NODES: [Node] = [ documentation: "An element to represent a single component in a version, like `.1`.", children: [ Child( - name: "Period", + name: "period", kind: .token(choices: [.token(.period)]), documentation: "The period of this version component" ), Child( - name: "Number", + name: "number", kind: .token(choices: [.token(.integerLiteral)]), documentation: "The version number of this component" ), @@ -173,12 +173,12 @@ public let AVAILABILITY_NODES: [Node] = [ documentation: "A version number like `1.2.0`. Only the first version component is required. There might be an arbitrary number of following components.", children: [ Child( - name: "Major", + name: "major", kind: .token(choices: [.token(.integerLiteral)]), documentation: "The major version." ), Child( - name: "Components", + name: "components", kind: .collection(kind: .versionComponentList, collectionElementName: "VersionComponent"), documentation: "Any version components that are not the major version . For example, for `1.2.0`, this will contain `.2.0`" ), diff --git a/CodeGeneration/Sources/SyntaxSupport/Child.swift b/CodeGeneration/Sources/SyntaxSupport/Child.swift index fc2ad08e609..a32c9de76b0 100644 --- a/CodeGeneration/Sources/SyntaxSupport/Child.swift +++ b/CodeGeneration/Sources/SyntaxSupport/Child.swift @@ -214,8 +214,8 @@ public class Child { documentation: String? = nil, isOptional: Bool = false ) { - precondition(name.first?.isUppercase ?? true, "The first letter of a child’s name should be uppercase") - precondition(deprecatedName?.first?.isUppercase ?? true, "The first letter of a child’s name should be uppercase") + precondition(name.first?.isLowercase ?? true, "The first letter of a child’s name should be lowercase") + precondition(deprecatedName?.first?.isLowercase ?? true, "The first letter of a child’s deprecatedName should be lowercase") self.name = name self.deprecatedName = deprecatedName self.kind = kind diff --git a/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift b/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift index dfd68452065..f37e229833c 100644 --- a/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift @@ -28,25 +28,25 @@ public let COMMON_NODES: [Node] = [ parserFunction: "parseNonOptionalCodeBlockItem", children: [ Child( - name: "Item", + name: "item", kind: .nodeChoices(choices: [ Child( - name: "Decl", + name: "decl", kind: .node(kind: .decl) ), Child( - name: "Stmt", + name: "stmt", kind: .node(kind: .stmt) ), Child( - name: "Expr", + name: "expr", kind: .node(kind: .expr) ), ]), documentation: "The underlying node inside the code block." ), Child( - name: "Semicolon", + name: "semicolon", kind: .token(choices: [.token(.semicolon)]), documentation: "If present, the trailing semicolon at the end of the item.", isOptional: true @@ -65,16 +65,16 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "LeftBrace", + name: "leftBrace", kind: .token(choices: [.token(.leftBrace)]) ), Child( - name: "Statements", + name: "statements", kind: .collection(kind: .codeBlockItemList, collectionElementName: "Statement"), nameForDiagnostics: "statements" ), Child( - name: "RightBrace", + name: "rightBrace", kind: .token(choices: [.token(.rightBrace)]) ), ] @@ -90,12 +90,12 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "AsyncSpecifier", + name: "asyncSpecifier", kind: .token(choices: [.keyword(text: "async")]), isOptional: true ), Child( - name: "ThrowsSpecifier", + name: "throwsSpecifier", kind: .token(choices: [.keyword(text: "throws")]), isOptional: true ), @@ -112,12 +112,12 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "AsyncSpecifier", + name: "asyncSpecifier", kind: .token(choices: [.keyword(text: "async"), .keyword(text: "reasync")]), isOptional: true ), Child( - name: "ThrowsSpecifier", + name: "throwsSpecifier", kind: .token(choices: [.keyword(text: "throws"), .keyword(text: "rethrows")]), isOptional: true ), @@ -132,7 +132,7 @@ public let COMMON_NODES: [Node] = [ traits: [], children: [ Child( - name: "AsyncSpecifier", + name: "asyncSpecifier", kind: .token(choices: [.keyword(text: "async")]), isOptional: true ) @@ -165,17 +165,17 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), documentation: "If there were standalone attributes without a declaration to attach them to, the ``MissingDeclSyntax`` will contain these." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), documentation: "If there were standalone modifiers without a declaration to attach them to, the ``MissingDeclSyntax`` will contain these." ), Child( - name: "Placeholder", + name: "placeholder", kind: .token(choices: [.token(.identifier)], requiresLeadingSpace: false, requiresTrailingSpace: false), documentation: """ A placeholder, i.e. `<#decl#>`, that can be inserted into the source code to represent the missing declaration. @@ -196,7 +196,7 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "Placeholder", + name: "placeholder", kind: .token(choices: [.token(.identifier)], requiresLeadingSpace: false, requiresTrailingSpace: false), documentation: """ A placeholder, i.e. `<#expression#>`, that can be inserted into the source code to represent the missing expression. @@ -217,7 +217,7 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "Placeholder", + name: "placeholder", kind: .token(choices: [.token(.identifier)], requiresLeadingSpace: false, requiresTrailingSpace: false), documentation: """ A placeholder, i.e. `<#pattern#>`, that can be inserted into the source code to represent the missing pattern. @@ -238,7 +238,7 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "Placeholder", + name: "placeholder", kind: .token(choices: [.token(.identifier)], requiresLeadingSpace: false, requiresTrailingSpace: false), documentation: """ A placeholder, i.e. `<#statement#>`, that can be inserted into the source code to represent the missing pattern. @@ -259,7 +259,7 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "Placeholder", + name: "placeholder", kind: .token(choices: [.token(.identifier)], requiresLeadingSpace: false, requiresTrailingSpace: false), documentation: """ A placeholder, i.e. `<#syntax#>`, that can be inserted into the source code to represent the missing pattern. @@ -280,7 +280,7 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "Placeholder", + name: "placeholder", kind: .token(choices: [.token(.identifier)], requiresLeadingSpace: false, requiresTrailingSpace: false), documentation: """ A placeholder, i.e. `<#type#>`, that can be inserted into the source code to represent the missing type. @@ -315,12 +315,12 @@ public let COMMON_NODES: [Node] = [ ], children: [ Child( - name: "AsyncSpecifier", + name: "asyncSpecifier", kind: .token(choices: [.keyword(text: "async")]), isOptional: true ), Child( - name: "ThrowsSpecifier", + name: "throwsSpecifier", kind: .token(choices: [.keyword(text: "throws")]), isOptional: true ), diff --git a/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift b/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift index 4ce69d4c1b1..b5d1cf98d1b 100644 --- a/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift @@ -17,7 +17,7 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Name", + name: "name", kind: .token(choices: [ .token(.identifier), .token(.binaryOperator), @@ -27,8 +27,8 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: "name" ), Child( - name: "TrailingPeriod", - deprecatedName: "TrailingDot", + name: "trailingPeriod", + deprecatedName: "trailingDot", kind: .token(choices: [.token(.period)]), isOptional: true ), @@ -52,24 +52,24 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "LeftBrace", + name: "leftBrace", kind: .token(choices: [.token(.leftBrace)]) ), Child( - name: "Accessors", + name: "accessors", kind: .nodeChoices(choices: [ Child( - name: "Accessors", + name: "accessors", kind: .collection(kind: .accessorDeclList, collectionElementName: "Accessor") ), Child( - name: "Getter", + name: "getter", kind: .node(kind: .codeBlockItemList) ), ]) ), Child( - name: "RightBrace", + name: "rightBrace", kind: .token(choices: [.token(.rightBrace)]) ), ] @@ -83,19 +83,19 @@ public let DECL_NODES: [Node] = [ traits: ["WithAttributes"], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifier", + name: "modifier", kind: .node(kind: .declModifier), nameForDiagnostics: "modifiers", isOptional: true ), Child( - name: "AccessorSpecifier", - deprecatedName: "AccessorKind", + name: "accessorSpecifier", + deprecatedName: "accessorKind", kind: .token(choices: [ .keyword(text: "get"), .keyword(text: "set"), @@ -113,19 +113,19 @@ public let DECL_NODES: [Node] = [ ]) ), Child( - name: "Parameters", - deprecatedName: "Parameter", + name: "parameters", + deprecatedName: "parameter", kind: .node(kind: .accessorParameters), nameForDiagnostics: "parameter", isOptional: true ), Child( - name: "EffectSpecifiers", + name: "effectSpecifiers", kind: .node(kind: .accessorEffectSpecifiers), isOptional: true ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock), isOptional: true ), @@ -149,16 +149,16 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Name", + name: "name", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "name" ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -184,46 +184,46 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "ActorKeyword", + name: "actorKeyword", kind: .token(choices: [.keyword(text: "actor")]) ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]) ), Child( - name: "GenericParameterClause", + name: "genericParameterClause", kind: .node(kind: .genericParameterClause), nameForDiagnostics: "generic parameter clause", documentation: "The parameter clause that defines the generic parameters.", isOptional: true ), Child( - name: "InheritanceClause", + name: "inheritanceClause", kind: .node(kind: .inheritanceClause), nameForDiagnostics: "inheritance clause", isOptional: true ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", isOptional: true ), Child( - name: "MemberBlock", + name: "memberBlock", kind: .node(kind: .memberBlock) ), ] @@ -272,43 +272,43 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "Attributes attached to the associated type declaration." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "Modifiers attached to the associated type declaration." ), Child( - name: "AssociatedtypeKeyword", + name: "associatedtypeKeyword", kind: .token(choices: [.keyword(text: "associatedtype")]), documentation: "The `associatedtype` keyword for this declaration." ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]), documentation: "The name of this associated type." ), Child( - name: "InheritanceClause", + name: "inheritanceClause", kind: .node(kind: .inheritanceClause), nameForDiagnostics: "inheritance clause", documentation: "The inheritance clause describing conformances for this associated type declaration.", isOptional: true ), Child( - name: "Initializer", + name: "initializer", kind: .node(kind: .typeInitializerClause), documentation: "The type initializer clause for this associated type declaration which represents a default type assignment for the associated type.", isOptional: true ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "The `where` clause that applies to the generic parameters of this associated type declaration.", @@ -362,51 +362,51 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "Attributes attached to the class declaration, such as an `@available` attribute." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "Modifiers attached to the class declaration, such as `public`." ), Child( - name: "ClassKeyword", + name: "classKeyword", kind: .token(choices: [.keyword(text: "class")]), documentation: "The `class` keyword for this declaration." ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]), documentation: "The name of the class." ), Child( - name: "GenericParameterClause", + name: "genericParameterClause", kind: .node(kind: .genericParameterClause), nameForDiagnostics: "generic parameter clause", documentation: "The generic parameters, if any, of the class declaration.", isOptional: true ), Child( - name: "InheritanceClause", + name: "inheritanceClause", kind: .node(kind: .inheritanceClause), nameForDiagnostics: "inheritance clause", documentation: "The inheritance clause describing one or more conformances for this class declaration.", isOptional: true ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "The `where` clause that applies to the generic parameters of this class declaration.", isOptional: true ), Child( - name: "MemberBlock", + name: "memberBlock", kind: .node(kind: .memberBlock), documentation: "The members of the class declaration. As class extension declarations may declare additional members, the contents of this member block isn't guaranteed to be a complete list of members for this type." @@ -423,15 +423,15 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Detail", + name: "detail", kind: .token(choices: [.token(.identifier)]) ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -443,7 +443,7 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: "modifier", children: [ Child( - name: "Name", + name: "name", kind: .token(choices: [ .keyword(text: "__consuming"), .keyword(text: "__setter_access"), @@ -483,7 +483,7 @@ public let DECL_NODES: [Node] = [ ]) ), Child( - name: "Detail", + name: "detail", kind: .node(kind: .declModifierDetail), isOptional: true ), @@ -510,29 +510,29 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "Attributes that are attached to the deinitializer." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "Modifiers that are attached to the deinitializer." ), Child( - name: "DeinitKeyword", + name: "deinitKeyword", kind: .token(choices: [.keyword(text: "deinit")]), documentation: "The deinit keyword." ), Child( - name: "EffectSpecifiers", + name: "effectSpecifiers", kind: .node(kind: .deinitializerEffectSpecifiers), isOptional: true ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock), documentation: "The deinitializer's body.", isOptional: true @@ -546,11 +546,11 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "LeadingComma", + name: "leadingComma", kind: .token(choices: [.token(.comma)]) ), Child( - name: "Name", + name: "name", kind: .node(kind: .token) ), ] @@ -578,18 +578,18 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), documentation: "If there were attributes before the editor placeholder, the ``EditorPlaceholderDeclSyntax`` will contain these." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), documentation: "If there were modifiers before the editor placeholder, the `EditorPlaceholderDecl` will contain these." ), Child( - name: "Placeholder", - deprecatedName: "Identifier", + name: "placeholder", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]), documentation: """ The actual editor placeholder that starts with `<#` and ends with `#>`. @@ -607,19 +607,19 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]), documentation: "The '(' to open the parameter clause." ), Child( - name: "Parameters", - deprecatedName: "ParameterList", + name: "parameters", + deprecatedName: "parameterList", kind: .collection(kind: .enumCaseParameterList, collectionElementName: "Parameter"), nameForDiagnostics: "parameters", documentation: "The actual parameters." ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]), documentation: "The ')' to close the parameter clause." ), @@ -641,42 +641,42 @@ public let DECL_NODES: [Node] = [ traits: ["WithTrailingComma", "WithModifiers"], children: [ Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "FirstName", + name: "firstName", kind: .token(choices: [.token(.identifier), .token(.wildcard)]), isOptional: true ), Child( - name: "SecondName", + name: "secondName", kind: .token(choices: [.token(.identifier), .token(.wildcard)]), isOptional: true ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), documentation: "If the parameter has a label, the colon separating the label from the type.", isOptional: true ), Child( - name: "Type", + name: "type", kind: .node(kind: .type), nameForDiagnostics: "type", documentation: "The parameter's type." ), Child( - name: "DefaultValue", - deprecatedName: "DefaultArgument", + name: "defaultValue", + deprecatedName: "defaultArgument", kind: .node(kind: .initializerClause), nameForDiagnostics: "default value", documentation: "If the parameter has a default value, the initializer clause describing the default value.", isOptional: true ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), documentation: "If the parameter is followed by another parameter, the comma separating them.", isOptional: true @@ -695,24 +695,24 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "The attributes applied to the case declaration." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "The declaration modifiers applied to the case declaration." ), Child( - name: "CaseKeyword", + name: "caseKeyword", kind: .token(choices: [.keyword(text: "case")]), documentation: "The `case` keyword for this case." ), Child( - name: "Elements", + name: "elements", kind: .collection(kind: .enumCaseElementList, collectionElementName: "Element"), nameForDiagnostics: "elements", documentation: "The elements this case declares." @@ -738,27 +738,27 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]), documentation: "The name of this case." ), Child( - name: "ParameterClause", - deprecatedName: "AssociatedValue", + name: "parameterClause", + deprecatedName: "associatedValue", kind: .node(kind: .enumCaseParameterClause), nameForDiagnostics: "associated values", documentation: "The set of associated values of the case.", isOptional: true ), Child( - name: "RawValue", + name: "rawValue", kind: .node(kind: .initializerClause), documentation: "The raw value of this enum element, if present.", isOptional: true ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), documentation: "The trailing comma of this element, if the case has multiple elements.", isOptional: true @@ -780,52 +780,52 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "The attributes applied to the enum declaration." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "The declaration modifiers applied to the enum declaration." ), Child( - name: "EnumKeyword", + name: "enumKeyword", kind: .token(choices: [.keyword(text: "enum")]), documentation: "The `enum` keyword for this declaration." ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]), documentation: "Declares the name of this enum. If the name matches a reserved keyword use backticks to escape it." ), Child( - name: "GenericParameterClause", - deprecatedName: "GenericParameters", + name: "genericParameterClause", + deprecatedName: "genericParameters", kind: .node(kind: .genericParameterClause), nameForDiagnostics: "generic parameter clause", documentation: "The generic parameters, if any, for this enum declaration.", isOptional: true ), Child( - name: "InheritanceClause", + name: "inheritanceClause", kind: .node(kind: .inheritanceClause), nameForDiagnostics: "inheritance clause", documentation: "The inheritance clause describing conformances or raw values for this enum declaration.", isOptional: true ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "The `where` clause that applies to the generic parameters of this enum declaration.", isOptional: true ), Child( - name: "MemberBlock", + name: "memberBlock", kind: .node(kind: .memberBlock), documentation: "The cases and other members associated with this enum declaration. Because enum extension declarations may declare additional members the contents of this member block isn't guaranteed to be a complete list of members for this type." @@ -850,38 +850,38 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "ExtensionKeyword", + name: "extensionKeyword", kind: .token(choices: [.keyword(text: "extension")]) ), Child( - name: "ExtendedType", + name: "extendedType", kind: .node(kind: .type) ), Child( - name: "InheritanceClause", + name: "inheritanceClause", kind: .node(kind: .inheritanceClause), nameForDiagnostics: "inheritance clause", isOptional: true ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", isOptional: true ), Child( - name: "MemberBlock", + name: "memberBlock", kind: .node(kind: .memberBlock) ), ] @@ -899,22 +899,22 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "FuncKeyword", + name: "funcKeyword", kind: .token(choices: [.keyword(text: "func")]) ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [ .token(.identifier), .token(.binaryOperator), @@ -923,26 +923,26 @@ public let DECL_NODES: [Node] = [ ]) ), Child( - name: "GenericParameterClause", + name: "genericParameterClause", kind: .node(kind: .genericParameterClause), nameForDiagnostics: "generic parameter clause", documentation: "The parameter clause that defines the generic parameters.", isOptional: true ), Child( - name: "Signature", + name: "signature", kind: .node(kind: .functionSignature), nameForDiagnostics: "function signature" ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", isOptional: true ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock), isOptional: true ), @@ -967,50 +967,50 @@ public let DECL_NODES: [Node] = [ traits: ["WithTrailingComma", "WithAttributes", "WithModifiers"], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "FirstName", + name: "firstName", kind: .token(choices: [.token(.identifier), .token(.wildcard)]) ), // One of these two names needs be optional, we choose the second // name to avoid backtracking. Child( - name: "SecondName", + name: "secondName", kind: .token(choices: [.token(.identifier), .token(.wildcard)], requiresLeadingSpace: true), nameForDiagnostics: "internal name", isOptional: true ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Type", + name: "type", kind: .node(kind: .type), nameForDiagnostics: "type" ), Child( - name: "Ellipsis", + name: "ellipsis", kind: .token(choices: [.token(.ellipsis)]), isOptional: true ), Child( - name: "DefaultValue", - deprecatedName: "DefaultArgument", + name: "defaultValue", + deprecatedName: "defaultArgument", kind: .node(kind: .initializerClause), nameForDiagnostics: "default value", isOptional: true ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -1025,18 +1025,18 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: "function signature", children: [ Child( - name: "ParameterClause", - deprecatedName: "Input", + name: "parameterClause", + deprecatedName: "input", kind: .node(kind: .functionParameterClause) ), Child( - name: "EffectSpecifiers", + name: "effectSpecifiers", kind: .node(kind: .functionEffectSpecifiers), isOptional: true ), Child( - name: "ReturnClause", - deprecatedName: "Output", + name: "returnClause", + deprecatedName: "output", kind: .node(kind: .returnClause), isOptional: true ), @@ -1058,36 +1058,36 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: "conditional compilation clause", children: [ Child( - name: "PoundKeyword", + name: "poundKeyword", kind: .token(choices: [.token(.poundIf), .token(.poundElseif), .token(.poundElse)]) ), Child( - name: "Condition", + name: "condition", kind: .node(kind: .expr), nameForDiagnostics: "condition", isOptional: true ), Child( - name: "Elements", + name: "elements", kind: .nodeChoices(choices: [ Child( - name: "Statements", + name: "statements", kind: .node(kind: .codeBlockItemList) ), Child( - name: "SwitchCases", + name: "switchCases", kind: .node(kind: .switchCaseList) ), Child( - name: "Decls", + name: "decls", kind: .node(kind: .memberBlockItemList) ), Child( - name: "PostfixExpression", + name: "postfixExpression", kind: .node(kind: .expr) ), Child( - name: "Attributes", + name: "attributes", kind: .node(kind: .attributeList) ), ]), @@ -1104,11 +1104,11 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: "conditional compilation block", children: [ Child( - name: "Clauses", + name: "clauses", kind: .collection(kind: .ifConfigClauseList, collectionElementName: "Clause") ), Child( - name: "PoundEndif", + name: "poundEndif", kind: .token(choices: [.token(.poundEndif)]) ), ] @@ -1133,26 +1133,26 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "Attributes attached to the import declaration, for example `@testable`." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "Modifiers attached to the import declaration. Currently, no modifiers are supported by Swift." ), Child( - name: "ImportKeyword", - deprecatedName: "ImportTok", + name: "importKeyword", + deprecatedName: "importTok", kind: .token(choices: [.keyword(text: "import")]), documentation: "The `import` keyword for this declaration." ), Child( - name: "ImportKindSpecifier", - deprecatedName: "ImportKind", + name: "importKindSpecifier", + deprecatedName: "importKind", kind: .token(choices: [ .keyword(text: "typealias"), .keyword(text: "struct"), @@ -1172,7 +1172,7 @@ public let DECL_NODES: [Node] = [ isOptional: true ), Child( - name: "Path", + name: "path", kind: .collection(kind: .importPathComponentList, collectionElementName: "PathComponent"), documentation: "The path to the module, submodule or symbol being imported." ), @@ -1195,12 +1195,12 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Type", - deprecatedName: "TypeName", + name: "type", + deprecatedName: "typeName", kind: .node(kind: .type) ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -1214,11 +1214,11 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Equal", + name: "equal", kind: .token(choices: [.token(.equal)]) ), Child( - name: "Value", + name: "value", kind: .node(kind: .expr) ), ] @@ -1247,24 +1247,24 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "Attributes that are attached to the initializer." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "Modifiers attached to the initializer" ), Child( - name: "InitKeyword", + name: "initKeyword", kind: .token(choices: [.keyword(text: "init")]), documentation: "The init keyword" ), Child( - name: "OptionalMark", + name: "optionalMark", kind: .token(choices: [ .token(.postfixQuestionMark), .token(.infixQuestionMark), @@ -1274,27 +1274,27 @@ public let DECL_NODES: [Node] = [ isOptional: true ), Child( - name: "GenericParameterClause", + name: "genericParameterClause", kind: .node(kind: .genericParameterClause), nameForDiagnostics: "generic parameter clause", documentation: "Generic parameters of the initializer.", isOptional: true ), Child( - name: "Signature", + name: "signature", kind: .node(kind: .functionSignature), nameForDiagnostics: "function signature", documentation: "The arguments of the initializer. While the function signature allows specifying a return clause, doing so is not semantically valid." ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "If the initializer had generic parameters, a where clause that can restrict those", isOptional: true ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock), documentation: "The initializer’s body. Missing if the initializer is a requirement of a protocol declaration.", isOptional: true @@ -1314,44 +1314,44 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "MacroKeyword", + name: "macroKeyword", kind: .token(choices: [.keyword(text: "macro")]) ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]) ), Child( - name: "GenericParameterClause", + name: "genericParameterClause", kind: .node(kind: .genericParameterClause), nameForDiagnostics: "generic parameter clause", documentation: "The parameter clause that defines the generic parameters.", isOptional: true ), Child( - name: "Signature", + name: "signature", kind: .node(kind: .functionSignature), nameForDiagnostics: "macro signature" ), Child( - name: "Definition", + name: "definition", kind: .node(kind: .initializerClause), nameForDiagnostics: "macro definition", isOptional: true ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", @@ -1372,54 +1372,54 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "Pound", - deprecatedName: "PoundToken", + name: "pound", + deprecatedName: "poundToken", kind: .token(choices: [.token(.pound)]), documentation: "The `#` sign." ), Child( - name: "MacroName", - deprecatedName: "Macro", + name: "macroName", + deprecatedName: "macro", kind: .token(choices: [.token(.identifier)]) ), Child( - name: "GenericArgumentClause", - deprecatedName: "GenericArguments", + name: "genericArgumentClause", + deprecatedName: "genericArguments", kind: .node(kind: .genericArgumentClause), isOptional: true ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]), isOptional: true ), Child( - name: "Arguments", - deprecatedName: "ArgumentList", + name: "arguments", + deprecatedName: "argumentList", kind: .collection(kind: .labeledExprList, collectionElementName: "Argument") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]), isOptional: true ), Child( - name: "TrailingClosure", + name: "trailingClosure", kind: .node(kind: .closureExpr), isOptional: true ), Child( - name: "AdditionalTrailingClosures", + name: "additionalTrailingClosures", kind: .collection(kind: .multipleTrailingClosureElementList, collectionElementName: "AdditionalTrailingClosure", defaultsToEmpty: true) ), ] @@ -1433,15 +1433,15 @@ public let DECL_NODES: [Node] = [ traits: ["Braced"], children: [ Child( - name: "LeftBrace", + name: "leftBrace", kind: .token(choices: [.token(.leftBrace)]) ), Child( - name: "Members", + name: "members", kind: .collection(kind: .memberBlockItemList, collectionElementName: "Member") ), Child( - name: "RightBrace", + name: "rightBrace", kind: .token(choices: [.token(.rightBrace)]) ), ] @@ -1455,12 +1455,12 @@ public let DECL_NODES: [Node] = [ documentation: "A member declaration of a type consisting of a declaration and an optional semicolon;", children: [ Child( - name: "Decl", + name: "decl", kind: .node(kind: .decl), documentation: "The declaration of the type member." ), Child( - name: "Semicolon", + name: "semicolon", kind: .token(choices: [.token(.semicolon)]), documentation: "An optional trailing semicolon.", isOptional: true @@ -1516,23 +1516,23 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "FixitySpecifier", - deprecatedName: "Fixity", + name: "fixitySpecifier", + deprecatedName: "fixity", kind: .token(choices: [.keyword(text: "prefix"), .keyword(text: "postfix"), .keyword(text: "infix")]), nameForDiagnostics: "fixity", documentation: "The fixity applied to the 'operator' declaration." ), Child( - name: "OperatorKeyword", + name: "operatorKeyword", kind: .token(choices: [.keyword(text: "operator")]) ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.binaryOperator), .token(.prefixOperator), .token(.postfixOperator)]) ), Child( - name: "OperatorPrecedenceAndTypes", + name: "operatorPrecedenceAndTypes", kind: .node(kind: .operatorPrecedenceAndTypes), documentation: "Optionally specify a precedence group and designated types.", isOptional: true @@ -1548,17 +1548,17 @@ public let DECL_NODES: [Node] = [ documentation: "A clause to specify precedence group in infix operator declarations, and designated types in any operator declaration.", children: [ Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "PrecedenceGroup", + name: "precedenceGroup", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "precedence group", documentation: "The precedence group for this operator" ), Child( - name: "DesignatedTypes", + name: "designatedTypes", kind: .collection(kind: .designatedTypeList, collectionElementName: "DesignatedTypeElement"), documentation: "The designated types associated with this operator." ), @@ -1574,17 +1574,17 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Parameters", - deprecatedName: "ParameterList", + name: "parameters", + deprecatedName: "parameterList", kind: .collection(kind: .functionParameterList, collectionElementName: "Parameter"), nameForDiagnostics: "parameters" ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -1610,7 +1610,7 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Pattern", + name: "pattern", kind: .node(kind: .pattern), documentation: """ The pattern that defines the variables. @@ -1627,7 +1627,7 @@ public let DECL_NODES: [Node] = [ """ ), Child( - name: "TypeAnnotation", + name: "typeAnnotation", kind: .node(kind: .typeAnnotation), nameForDiagnostics: "type annotation", documentation: """ @@ -1638,7 +1638,7 @@ public let DECL_NODES: [Node] = [ isOptional: true ), Child( - name: "Initializer", + name: "initializer", kind: .node(kind: .initializerClause), documentation: """ If the variables have a default value, the clause that initializes them. @@ -1646,8 +1646,8 @@ public let DECL_NODES: [Node] = [ isOptional: true ), Child( - name: "AccessorBlock", - deprecatedName: "Accessor", + name: "accessorBlock", + deprecatedName: "accessor", kind: .node(kind: .accessorBlock), documentation: """ If the variable is computed, the accessors that get (and optionally set) the value. @@ -1655,7 +1655,7 @@ public let DECL_NODES: [Node] = [ isOptional: true ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -1668,36 +1668,36 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: "'#sourceLocation' arguments", children: [ Child( - name: "FileLabel", - deprecatedName: "FileArgLabel", + name: "fileLabel", + deprecatedName: "fileArgLabel", kind: .token(choices: [.keyword(text: "file")]) ), Child( - name: "FileColon", - deprecatedName: "FileArgColon", + name: "fileColon", + deprecatedName: "fileArgColon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "FileName", + name: "fileName", kind: .node(kind: .simpleStringLiteralExpr), nameForDiagnostics: "file name" ), Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]) ), Child( - name: "LineLabel", - deprecatedName: "LineArgLabel", + name: "lineLabel", + deprecatedName: "lineArgLabel", kind: .token(choices: [.keyword(text: "line")]) ), Child( - name: "LineColon", - deprecatedName: "LineArgColon", + name: "lineColon", + deprecatedName: "lineArgColon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "LineNumber", + name: "lineNumber", kind: .token(choices: [.token(.integerLiteral)]), nameForDiagnostics: "line number" ), @@ -1713,22 +1713,22 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "PoundSourceLocation", + name: "poundSourceLocation", kind: .token(choices: [.token(.poundSourceLocation)]) ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Arguments", - deprecatedName: "Args", + name: "arguments", + deprecatedName: "args", kind: .node(kind: .poundSourceLocationArguments), nameForDiagnostics: "arguments", isOptional: true ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -1743,17 +1743,17 @@ public let DECL_NODES: [Node] = [ documentation: "Specifies the precedence of an operator when used in an operation that includes optional chaining.", children: [ Child( - name: "AssignmentLabel", - deprecatedName: "AssignmentKeyword", + name: "assignmentLabel", + deprecatedName: "assignmentKeyword", kind: .token(choices: [.keyword(text: "assignment")]) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Value", - deprecatedName: "Flag", + name: "value", + deprecatedName: "flag", kind: .token(choices: [.keyword(text: "true"), .keyword(text: "false")]), documentation: "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." @@ -1770,16 +1770,16 @@ public let DECL_NODES: [Node] = [ documentation: "Specifies how a sequence of operators with the same precedence level are grouped together in the absence of grouping parentheses.", children: [ Child( - name: "AssociativityLabel", - deprecatedName: "AssociativityKeyword", + name: "associativityLabel", + deprecatedName: "associativityKeyword", kind: .token(choices: [.keyword(text: "associativity")]) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Value", + name: "value", kind: .token(choices: [.keyword(text: "left"), .keyword(text: "right"), .keyword(text: "none")]), documentation: "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" @@ -1811,38 +1811,38 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "The attributes applied to the 'precedencegroup' declaration." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "The declaration modifiers applied to the 'precedencegroup' declaration." ), Child( - name: "PrecedencegroupKeyword", + name: "precedencegroupKeyword", kind: .token(choices: [.keyword(text: "precedencegroup")]) ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]), documentation: "The name of this precedence group." ), Child( - name: "LeftBrace", + name: "leftBrace", kind: .token(choices: [.token(.leftBrace)]) ), Child( - name: "GroupAttributes", + name: "groupAttributes", kind: .collection(kind: .precedenceGroupAttributeList, collectionElementName: "GroupAttribute"), documentation: "The characteristics of this precedence group." ), Child( - name: "RightBrace", + name: "rightBrace", kind: .token(choices: [.token(.rightBrace)]) ), ] @@ -1855,12 +1855,12 @@ public let DECL_NODES: [Node] = [ traits: ["WithTrailingComma"], children: [ Child( - name: "Name", + name: "name", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "name" ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -1885,18 +1885,18 @@ public let DECL_NODES: [Node] = [ documentation: "Specify the new precedence group's relation to existing precedence groups.", children: [ Child( - name: "HigherThanOrLowerThanLabel", - deprecatedName: "HigherThanOrLowerThan", + name: "higherThanOrLowerThanLabel", + deprecatedName: "higherThanOrLowerThan", kind: .token(choices: [.keyword(text: "higherThan"), .keyword(text: "lowerThan")]), documentation: "The relation to specified other precedence groups." ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "PrecedenceGroups", - deprecatedName: "OtherNames", + name: "precedenceGroups", + deprecatedName: "otherNames", kind: .collection(kind: .precedenceGroupNameList, collectionElementName: "OtherName"), documentation: "The name of other precedence group to which this precedence group relates." ), @@ -1926,51 +1926,51 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "Attributes attached to the protocol declaration, such as an `@available` attribute." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "Modifiers attached to the protocol declaration, such as `public`." ), Child( - name: "ProtocolKeyword", + name: "protocolKeyword", kind: .token(choices: [.keyword(text: "protocol")]), documentation: "The `protocol` keyword for this declaration." ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]), documentation: "The name of the protocol." ), Child( - name: "PrimaryAssociatedTypeClause", + name: "primaryAssociatedTypeClause", kind: .node(kind: .primaryAssociatedTypeClause), nameForDiagnostics: "primary associated type clause", documentation: "The primary associated type for the protocol.", isOptional: true ), Child( - name: "InheritanceClause", + name: "inheritanceClause", kind: .node(kind: .inheritanceClause), nameForDiagnostics: "inheritance clause", documentation: "The inheritance clause describing one or more conformances for this protocol declaration.", isOptional: true ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "The `where` clause that applies to the generic parameters of this protocol declaration.", isOptional: true ), Child( - name: "MemberBlock", + name: "memberBlock", kind: .node(kind: .memberBlock), documentation: "The members of the protocol declaration." ), @@ -1985,12 +1985,12 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Arrow", + name: "arrow", kind: .token(choices: [.token(.arrow)]) ), Child( - name: "Type", - deprecatedName: "ReturnType", + name: "type", + deprecatedName: "returnType", kind: .node(kind: .type), nameForDiagnostics: "return type" ), @@ -2006,18 +2006,18 @@ public let DECL_NODES: [Node] = [ traits: ["WithStatements"], children: [ Child( - name: "Shebang", + name: "shebang", kind: .token(choices: [.token(.shebang)]), documentation: "A shebang can specify the path of the compiler when using Swift source file as a script.", isOptional: true ), Child( - name: "Statements", + name: "statements", kind: .collection(kind: .codeBlockItemList, collectionElementName: "Statement") ), Child( - name: "EndOfFileToken", - deprecatedName: "EOFToken", + name: "endOfFileToken", + deprecatedName: "eofToken", kind: .token(choices: [.token(.endOfFile)]) ), ] @@ -2102,51 +2102,51 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes", documentation: "Attributes that are attached to the struct declaration." ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers", documentation: "Modifiers that are attached to the struct declaration." ), Child( - name: "StructKeyword", + name: "structKeyword", kind: .token(choices: [.keyword(text: "struct")]), documentation: "The `struct` keyword for this declaration." ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]), documentation: "Declares the name of this struct. If the name matches a reserved keyword use backticks to escape it." ), Child( - name: "GenericParameterClause", + name: "genericParameterClause", kind: .node(kind: .genericParameterClause), nameForDiagnostics: "generic parameter clause", documentation: "The generic parameters, if any, of the struct declaration.", isOptional: true ), Child( - name: "InheritanceClause", + name: "inheritanceClause", kind: .node(kind: .inheritanceClause), nameForDiagnostics: "inheritance clause", documentation: "The struct declaration inheritance clause describing one or more conformances for this struct declaration.", isOptional: true ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "The `where` clause that applies to the generic parameters of this struct declaration.", isOptional: true ), Child( - name: "MemberBlock", + name: "memberBlock", kind: .node(kind: .memberBlock), documentation: "The members of the struct declaration. Because struct extension declarations may declare additional members the contents of this member block isn't guaranteed to be a complete list of members for this type." @@ -2165,46 +2165,46 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "SubscriptKeyword", + name: "subscriptKeyword", kind: .token(choices: [.keyword(text: "subscript")]) ), Child( - name: "GenericParameterClause", + name: "genericParameterClause", kind: .node(kind: .genericParameterClause), nameForDiagnostics: "generic parameter clause", documentation: "The parameter clause that defines the generic parameters.", isOptional: true ), Child( - name: "ParameterClause", - deprecatedName: "Indices", + name: "parameterClause", + deprecatedName: "indices", kind: .node(kind: .functionParameterClause) ), Child( - name: "ReturnClause", - deprecatedName: "Result", + name: "returnClause", + deprecatedName: "result", kind: .node(kind: .returnClause) ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", isOptional: true ), Child( - name: "AccessorBlock", - deprecatedName: "Accessor", + name: "accessorBlock", + deprecatedName: "accessor", kind: .node(kind: .accessorBlock), isOptional: true ), @@ -2218,12 +2218,12 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: "inheritance clause", children: [ Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "InheritedTypes", - deprecatedName: "InheritedTypeCollection", + name: "inheritedTypes", + deprecatedName: "inheritedTypeCollection", kind: .collection(kind: .inheritedTypeList, collectionElementName: "InheritedType") ), ] @@ -2236,11 +2236,11 @@ public let DECL_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Equal", + name: "equal", kind: .token(choices: [.token(.equal)]) ), Child( - name: "Value", + name: "value", kind: .node(kind: .type), nameForDiagnostics: "type" ), @@ -2263,37 +2263,37 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "TypealiasKeyword", + name: "typealiasKeyword", kind: .token(choices: [.keyword(text: "typealias")]) ), Child( - name: "Name", - deprecatedName: "Identifier", + name: "name", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]) ), Child( - name: "GenericParameterClause", + name: "genericParameterClause", kind: .node(kind: .genericParameterClause), nameForDiagnostics: "generic parameter clause", documentation: "The parameter clause that defines the generic parameters.", isOptional: true ), Child( - name: "Initializer", + name: "initializer", kind: .node(kind: .typeInitializerClause) ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), nameForDiagnostics: "generic where clause", documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", @@ -2318,25 +2318,25 @@ public let DECL_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "BindingSpecifier", - deprecatedName: "BindingKeyword", + name: "bindingSpecifier", + deprecatedName: "bindingKeyword", kind: .token(choices: [.keyword(text: "let"), .keyword(text: "var"), .keyword(text: "inout")]), documentation: """ The specifier that defines the type of the variables declared (`let` or `var`). """ ), Child( - name: "Bindings", + name: "bindings", kind: .collection(kind: .patternBindingList, collectionElementName: "Binding"), documentation: """ The pattern bindings that define the actual variables. diff --git a/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift b/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift index c95ae9dac74..d5eb93acb28 100644 --- a/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift @@ -28,12 +28,12 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr), nameForDiagnostics: "value" ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -47,17 +47,17 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "array", children: [ Child( - name: "LeftSquare", - deprecatedName: "LeftSquareBracket", + name: "leftSquare", + deprecatedName: "leftSquareBracket", kind: .token(choices: [.token(.leftSquare)]) ), Child( - name: "Elements", + name: "elements", kind: .collection(kind: .arrayElementList, collectionElementName: "Element") ), Child( - name: "RightSquare", - deprecatedName: "RightSquareBracket", + name: "rightSquare", + deprecatedName: "rightSquareBracket", kind: .token(choices: [.token(.rightSquare)]) ), ] @@ -71,13 +71,13 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "EffectSpecifiers", + name: "effectSpecifiers", kind: .node(kind: .typeEffectSpecifiers), isOptional: true ), Child( - name: "Arrow", - deprecatedName: "ArrowToken", + name: "arrow", + deprecatedName: "arrowToken", kind: .token(choices: [.token(.arrow)]) ), ] @@ -93,22 +93,22 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "'as'", children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), Child( - name: "AsKeyword", - deprecatedName: "AsTok", + name: "asKeyword", + deprecatedName: "asTok", kind: .token(choices: [.keyword(text: "as")]) ), Child( - name: "QuestionOrExclamationMark", + name: "questionOrExclamationMark", kind: .token(choices: [.token(.postfixQuestionMark), .token(.exclamationMark)]), isOptional: true ), Child( - name: "Type", - deprecatedName: "TypeName", + name: "type", + deprecatedName: "typeName", kind: .node(kind: .type) ), ] @@ -121,8 +121,8 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Equal", - deprecatedName: "AssignToken", + name: "equal", + deprecatedName: "assignToken", kind: .token(choices: [.token(.equal)]) ) ] @@ -136,11 +136,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "'await' expression", children: [ Child( - name: "AwaitKeyword", + name: "awaitKeyword", kind: .token(choices: [.keyword(text: "await")]) ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), ] @@ -154,8 +154,8 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "operator", children: [ Child( - name: "Operator", - deprecatedName: "OperatorToken", + name: "operator", + deprecatedName: "operatorToken", kind: .token(choices: [.token(.binaryOperator)]) ) ] @@ -168,8 +168,8 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "bool literal", children: [ Child( - name: "Literal", - deprecatedName: "BooleanLiteral", + name: "literal", + deprecatedName: "booleanLiteral", kind: .token(choices: [.keyword(text: "true"), .keyword(text: "false")]) ) ] @@ -182,11 +182,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "'_borrow' expression", children: [ Child( - name: "BorrowKeyword", + name: "borrowKeyword", kind: .token(choices: [.keyword(text: "_borrow")]) ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), ] @@ -199,24 +199,24 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "'canImport' expression", children: [ Child( - name: "CanImportKeyword", + name: "canImportKeyword", kind: .token(choices: [.keyword(text: "canImport")]) ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "ImportPath", + name: "importPath", kind: .token(choices: [.token(.identifier)]) ), Child( - name: "VersionInfo", + name: "versionInfo", kind: .node(kind: .canImportVersionInfo), isOptional: true ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -228,20 +228,20 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]) ), Child( - name: "Label", + name: "label", kind: .token(choices: [.keyword(text: "_version"), .keyword(text: "_underlyingVersion")]) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Version", - deprecatedName: "VersionTuple", + name: "version", + deprecatedName: "versionTuple", kind: .node(kind: .versionTuple) ), ] @@ -257,16 +257,16 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "Pattern", + name: "pattern", kind: .node(kind: .pattern) ), Child( - name: "WhereClause", + name: "whereClause", kind: .node(kind: .whereClause), isOptional: true ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -286,21 +286,21 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "closure capture specifier", children: [ Child( - name: "Specifier", + name: "specifier", kind: .token(choices: [.keyword(text: "weak"), .keyword(text: "unowned")]) ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]), isOptional: true ), Child( - name: "Detail", + name: "detail", kind: .token(choices: [.keyword(text: "safe"), .keyword(text: "unsafe")]), isOptional: true ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]), isOptional: true ), @@ -316,27 +316,27 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "Specifier", + name: "specifier", kind: .node(kind: .closureCaptureSpecifier), isOptional: true ), Child( - name: "Name", + name: "name", kind: .token(choices: [.token(.identifier)]), isOptional: true ), Child( - name: "Equal", - deprecatedName: "AssignToken", + name: "equal", + deprecatedName: "assignToken", kind: .token(choices: [.token(.equal)]), isOptional: true ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -349,15 +349,15 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "closure capture clause", children: [ Child( - name: "LeftSquare", + name: "leftSquare", kind: .token(choices: [.token(.leftSquare)]) ), Child( - name: "Items", + name: "items", kind: .collection(kind: .closureCaptureList, collectionElementName: "Item") ), Child( - name: "RightSquare", + name: "rightSquare", kind: .token(choices: [.token(.rightSquare)]) ), ] @@ -371,48 +371,48 @@ public let EXPR_NODES: [Node] = [ traits: ["WithTrailingComma", "WithAttributes", "WithModifiers"], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Modifiers", + name: "modifiers", kind: .collection(kind: .declModifierList, collectionElementName: "Modifier", defaultsToEmpty: true), nameForDiagnostics: "modifiers" ), Child( - name: "FirstName", + name: "firstName", kind: .token(choices: [.token(.identifier), .token(.wildcard)]), documentation: "The label of this parameter that will be used when the closure is called." ), Child( - name: "SecondName", + name: "secondName", kind: .token(choices: [.token(.identifier), .token(.wildcard)]), documentation: "If this is specified, it is the name by which the parameter can be referenced inside the closure body. If it is `nil`, the closure parameter is referenced by the first name.", isOptional: true ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), documentation: "The colon separating the parameter's name and type.", isOptional: true ), Child( - name: "Type", + name: "type", kind: .node(kind: .type), nameForDiagnostics: "type", documentation: "The type of the parameter.", isOptional: true ), Child( - name: "Ellipsis", + name: "ellipsis", kind: .token(choices: [.token(.ellipsis)]), documentation: "If the parameter is variadic, `...` to indicate that.", isOptional: true ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), documentation: "If the parameter is followed by another parameter, the comma separating them.", isOptional: true @@ -436,19 +436,19 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]), documentation: "The '(' to open the parameter clause." ), Child( - name: "Parameters", - deprecatedName: "ParameterList", + name: "parameters", + deprecatedName: "parameterList", kind: .collection(kind: .closureParameterList, collectionElementName: "Parameter"), nameForDiagnostics: "parameters", documentation: "The actual parameters." ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]), documentation: "The ')' to close the parameter clause." ), @@ -465,20 +465,20 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "LeftBrace", + name: "leftBrace", kind: .token(choices: [.token(.leftBrace)]) ), Child( - name: "Signature", + name: "signature", kind: .node(kind: .closureSignature), isOptional: true ), Child( - name: "Statements", + name: "statements", kind: .collection(kind: .codeBlockItemList, collectionElementName: "Statement") ), Child( - name: "RightBrace", + name: "rightBrace", kind: .token(choices: [.token(.rightBrace)]) ), ] @@ -501,12 +501,12 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "Name", + name: "name", kind: .token(choices: [.token(.identifier), .token(.wildcard)]), nameForDiagnostics: "name" ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -522,45 +522,45 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true), nameForDiagnostics: "attributes" ), Child( - name: "Capture", + name: "capture", kind: .node(kind: .closureCaptureClause), isOptional: true ), Child( - name: "ParameterClause", - deprecatedName: "Input", + name: "parameterClause", + deprecatedName: "input", kind: .nodeChoices(choices: [ Child( - name: "SimpleInput", + name: "simpleInput", kind: .node(kind: .closureShorthandParameterList) ), Child( - name: "ParameterClause", - deprecatedName: "Input", + name: "parameterClause", + deprecatedName: "input", kind: .node(kind: .closureParameterClause) ), ]), isOptional: true ), Child( - name: "EffectSpecifiers", + name: "effectSpecifiers", kind: .node(kind: .typeEffectSpecifiers), isOptional: true ), Child( - name: "ReturnClause", - deprecatedName: "Output", + name: "returnClause", + deprecatedName: "output", kind: .node(kind: .returnClause), isOptional: true ), Child( - name: "InKeyword", - deprecatedName: "InTok", + name: "inKeyword", + deprecatedName: "inTok", kind: .token(choices: [.keyword(text: "in")]) ), ] @@ -582,11 +582,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Name", + name: "name", kind: .node(kind: .token) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)], requiresTrailingSpace: false) ), ] @@ -601,15 +601,15 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Arguments", + name: "arguments", kind: .collection(kind: .declNameArgumentList, collectionElementName: "Argument") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -632,23 +632,23 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "Key", - deprecatedName: "KeyExpression", + name: "key", + deprecatedName: "keyExpression", kind: .node(kind: .expr), nameForDiagnostics: "key" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Value", - deprecatedName: "ValueExpression", + name: "value", + deprecatedName: "valueExpression", kind: .node(kind: .expr), nameForDiagnostics: "value" ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -662,24 +662,24 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "dictionary", children: [ Child( - name: "LeftSquare", + name: "leftSquare", kind: .token(choices: [.token(.leftSquare)]) ), Child( - name: "Content", + name: "content", kind: .nodeChoices(choices: [ Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)], requiresTrailingSpace: false) ), Child( - name: "Elements", + name: "elements", kind: .node(kind: .dictionaryElementList) ), ]) ), Child( - name: "RightSquare", + name: "rightSquare", kind: .token(choices: [.token(.rightSquare)]) ), ] @@ -692,7 +692,7 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Wildcard", + name: "wildcard", kind: .token(choices: [.token(.wildcard)]) ) ] @@ -705,8 +705,8 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "editor placeholder", children: [ Child( - name: "Placeholder", - deprecatedName: "Identifier", + name: "placeholder", + deprecatedName: "identifier", kind: .token(choices: [.token(.identifier)]) ) ] @@ -730,25 +730,25 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "Backslash", + name: "backslash", kind: .token(choices: [.token(.backslash)]) ), Child( - name: "Pounds", - deprecatedName: "Delimiter", + name: "pounds", + deprecatedName: "delimiter", kind: .token(choices: [.token(.rawStringPoundDelimiter)]), isOptional: true ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Expressions", + name: "expressions", kind: .collection(kind: .labeledExprList, collectionElementName: "Expression") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -764,8 +764,8 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "floating literal", children: [ Child( - name: "Literal", - deprecatedName: "FloatingDigits", + name: "literal", + deprecatedName: "floatingDigits", kind: .token(choices: [.token(.floatLiteral)]) ) ] @@ -778,11 +778,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "force unwrap", children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), Child( - name: "ExclamationMark", + name: "exclamationMark", kind: .token(choices: [.token(.exclamationMark)]) ), ] @@ -796,34 +796,34 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "function call", children: [ Child( - name: "CalledExpression", + name: "calledExpression", kind: .node(kind: .expr), nameForDiagnostics: "called expression" ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]), isOptional: true ), Child( - name: "Arguments", - deprecatedName: "ArgumentList", + name: "arguments", + deprecatedName: "argumentList", kind: .collection(kind: .labeledExprList, collectionElementName: "Argument"), nameForDiagnostics: "arguments" ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]), isOptional: true ), Child( - name: "TrailingClosure", + name: "trailingClosure", kind: .node(kind: .closureExpr), nameForDiagnostics: "trailing closure", isOptional: true ), Child( - name: "AdditionalTrailingClosures", + name: "additionalTrailingClosures", kind: .collection(kind: .multipleTrailingClosureElementList, collectionElementName: "AdditionalTrailingClosure", defaultsToEmpty: true), nameForDiagnostics: "trailing closures" ), @@ -837,8 +837,8 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "BaseName", - deprecatedName: "Identifier", + name: "baseName", + deprecatedName: "identifier", kind: .token(choices: [ .token(.identifier), .keyword(text: "self"), @@ -850,8 +850,8 @@ public let EXPR_NODES: [Node] = [ ]) ), Child( - name: "ArgumentNames", - deprecatedName: "DeclNameArguments", + name: "argumentNames", + deprecatedName: "declNameArguments", kind: .node(kind: .declNameArguments), isOptional: true ), @@ -872,32 +872,32 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "IfKeyword", + name: "ifKeyword", kind: .token(choices: [.keyword(text: "if")]) ), Child( - name: "Conditions", + name: "conditions", kind: .collection(kind: .conditionElementList, collectionElementName: "Condition") ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock), nameForDiagnostics: "body" ), Child( - name: "ElseKeyword", + name: "elseKeyword", kind: .token(choices: [.keyword(text: "else")]), isOptional: true ), Child( - name: "ElseBody", + name: "elseBody", kind: .nodeChoices(choices: [ Child( - name: "IfExpr", + name: "ifExpr", kind: .node(kind: .ifExpr) ), Child( - name: "CodeBlock", + name: "codeBlock", kind: .node(kind: .codeBlock) ), ]), @@ -915,11 +915,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "inout expression", children: [ Child( - name: "Ampersand", + name: "ampersand", kind: .token(choices: [.token(.prefixAmpersand)]) ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), ] @@ -935,16 +935,16 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "LeftOperand", + name: "leftOperand", kind: .node(kind: .expr) ), Child( - name: "Operator", - deprecatedName: "OperatorOperand", + name: "operator", + deprecatedName: "operatorOperand", kind: .node(kind: .expr) ), Child( - name: "RightOperand", + name: "rightOperand", kind: .node(kind: .expr) ), ] @@ -960,8 +960,8 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "integer literal", children: [ Child( - name: "Literal", - deprecatedName: "Digits", + name: "literal", + deprecatedName: "digits", kind: .token(choices: [.token(.integerLiteral)]) ) ] @@ -988,19 +988,19 @@ public let EXPR_NODES: [Node] = [ """, children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr), documentation: "The expression which will be checked to determine whether it can be cast to a specific type." ), Child( - name: "IsKeyword", - deprecatedName: "IsTok", + name: "isKeyword", + deprecatedName: "isTok", kind: .token(choices: [.keyword(text: "is")]), documentation: "The `is` keyword for this expression." ), Child( - name: "Type", - deprecatedName: "TypeName", + name: "type", + deprecatedName: "typeName", kind: .node(kind: .type), documentation: "The type against which the expression will be checked to see if the expression can be cast to it." ), @@ -1022,23 +1022,23 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "key path component", children: [ Child( - name: "Period", + name: "period", kind: .token(choices: [.token(.period)]), isOptional: true ), Child( - name: "Component", + name: "component", kind: .nodeChoices(choices: [ Child( - name: "Property", + name: "property", kind: .node(kind: .keyPathPropertyComponent) ), Child( - name: "Subscript", + name: "subscript", kind: .node(kind: .keyPathSubscriptComponent) ), Child( - name: "Optional", + name: "optional", kind: .node(kind: .keyPathOptionalComponent) ), ]) @@ -1053,17 +1053,17 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "key path", children: [ Child( - name: "Backslash", + name: "backslash", kind: .token(choices: [.token(.backslash)]) ), Child( - name: "Root", + name: "root", kind: .node(kind: .type), nameForDiagnostics: "root", isOptional: true ), Child( - name: "Components", + name: "components", kind: .collection(kind: .keyPathComponentList, collectionElementName: "KeyPathComponent") ), ] @@ -1076,7 +1076,7 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "key path optional component", children: [ Child( - name: "QuestionOrExclamationMark", + name: "questionOrExclamationMark", kind: .token(choices: [.token(.postfixQuestionMark), .token(.exclamationMark)]) ) ] @@ -1089,11 +1089,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "key path property component", children: [ Child( - name: "DeclName", + name: "declName", kind: .node(kind: .declReferenceExpr) ), Child( - name: "GenericArgumentClause", + name: "genericArgumentClause", kind: .node(kind: .genericArgumentClause), isOptional: true ), @@ -1107,19 +1107,19 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "key path subscript component", children: [ Child( - name: "LeftSquare", - deprecatedName: "LeftBracket", + name: "leftSquare", + deprecatedName: "leftBracket", kind: .token(choices: [.token(.leftSquare)]) ), Child( - name: "Arguments", - deprecatedName: "ArgumentList", + name: "arguments", + deprecatedName: "argumentList", kind: .collection(kind: .labeledExprList, collectionElementName: "Argument"), nameForDiagnostics: "arguments" ), Child( - name: "RightSquare", - deprecatedName: "RightBracket", + name: "rightSquare", + deprecatedName: "rightBracket", kind: .token(choices: [.token(.rightSquare)]) ), ] @@ -1135,44 +1135,44 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "Pound", - deprecatedName: "PoundToken", + name: "pound", + deprecatedName: "poundToken", kind: .token(choices: [.token(.pound)]), documentation: "The `#` sign." ), Child( - name: "MacroName", - deprecatedName: "Macro", + name: "macroName", + deprecatedName: "macro", kind: .token(choices: [.token(.identifier)]) ), Child( - name: "GenericArgumentClause", - deprecatedName: "GenericArguments", + name: "genericArgumentClause", + deprecatedName: "genericArguments", kind: .node(kind: .genericArgumentClause), isOptional: true ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]), isOptional: true ), Child( - name: "Arguments", - deprecatedName: "ArgumentList", + name: "arguments", + deprecatedName: "argumentList", kind: .collection(kind: .labeledExprList, collectionElementName: "Argument") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]), isOptional: true ), Child( - name: "TrailingClosure", + name: "trailingClosure", kind: .node(kind: .closureExpr), isOptional: true ), Child( - name: "AdditionalTrailingClosures", + name: "additionalTrailingClosures", kind: .collection(kind: .multipleTrailingClosureElementList, collectionElementName: "AdditionalTrailingClosure", defaultsToEmpty: true) ), ] @@ -1186,19 +1186,19 @@ public let EXPR_NODES: [Node] = [ documentation: "An expression that access a member like a function or a property.", children: [ Child( - name: "Base", + name: "base", kind: .node(kind: .expr), nameForDiagnostics: "base", documentation: "The base of the member access, optionally specified.", isOptional: true ), Child( - name: "Period", - deprecatedName: "Dot", + name: "period", + deprecatedName: "dot", kind: .token(choices: [.token(.period)]) ), Child( - name: "DeclName", + name: "declName", kind: .node(kind: .declReferenceExpr), nameForDiagnostics: "name", documentation: "The name of the referenced function or a property." @@ -1213,12 +1213,12 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "'consume' expression", children: [ Child( - name: "ConsumeKeyword", - deprecatedName: "MoveKeyword", + name: "consumeKeyword", + deprecatedName: "moveKeyword", kind: .token(choices: [.keyword(text: "_move"), .keyword(text: "consume")]) ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), ] @@ -1230,11 +1230,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "'copy' expression", children: [ Child( - name: "CopyKeyword", + name: "copyKeyword", kind: .token(choices: [.keyword(text: "copy")]) ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), ] @@ -1254,16 +1254,16 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "trailing closure", children: [ Child( - name: "Label", + name: "label", kind: .token(choices: [.token(.identifier), .token(.wildcard)]), nameForDiagnostics: "label" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Closure", + name: "closure", kind: .node(kind: .closureExpr) ), ] @@ -1276,7 +1276,7 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "NilKeyword", + name: "nilKeyword", kind: .token(choices: [.keyword(text: "nil")]) ) ] @@ -1289,11 +1289,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "optional chaining", children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), Child( - name: "QuestionMark", + name: "questionMark", kind: .token(choices: [.token(.postfixQuestionMark)]) ), ] @@ -1306,12 +1306,12 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "EachKeyword", + name: "eachKeyword", kind: .token(choices: [.keyword(text: "each")]) ), Child( - name: "Pack", - deprecatedName: "PackRefExpr", + name: "pack", + deprecatedName: "packRefExpr", kind: .node(kind: .expr) ), ] @@ -1324,12 +1324,12 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "RepeatKeyword", + name: "repeatKeyword", kind: .token(choices: [.keyword(text: "repeat")]) ), Child( - name: "RepetitionPattern", - deprecatedName: "PatternExpr", + name: "repetitionPattern", + deprecatedName: "patternExpr", kind: .node(kind: .expr) ), ] @@ -1342,12 +1342,12 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Base", + name: "base", kind: .node(kind: .expr), isOptional: true ), Child( - name: "Config", + name: "config", kind: .node(kind: .ifConfigDecl) ), ] @@ -1360,12 +1360,12 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "postfix expression", children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), Child( - name: "Operator", - deprecatedName: "OperatorToken", + name: "operator", + deprecatedName: "operatorToken", kind: .token(choices: [.token(.postfixOperator)]) ), ] @@ -1380,13 +1380,13 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "operator", children: [ Child( - name: "Operator", - deprecatedName: "OperatorToken", + name: "operator", + deprecatedName: "operatorToken", kind: .token(choices: [.token(.prefixOperator)]) ), Child( - name: "Expression", - deprecatedName: "PostfixExpression", + name: "expression", + deprecatedName: "postfixExpression", kind: .node(kind: .expr) ), ] @@ -1400,27 +1400,27 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "regex literal", children: [ Child( - name: "OpeningPounds", + name: "openingPounds", kind: .token(choices: [.token(.regexPoundDelimiter)]), isOptional: true ), Child( - name: "OpeningSlash", - deprecatedName: "OpenSlash", + name: "openingSlash", + deprecatedName: "openSlash", kind: .token(choices: [.token(.regexSlash)]) ), Child( - name: "Regex", - deprecatedName: "RegexPattern", + name: "regex", + deprecatedName: "regexPattern", kind: .token(choices: [.token(.regexLiteralPattern)]) ), Child( - name: "ClosingSlash", - deprecatedName: "CloseSlash", + name: "closingSlash", + deprecatedName: "closeSlash", kind: .token(choices: [.token(.regexSlash)]) ), Child( - name: "ClosingPounds", + name: "closingPounds", kind: .token(choices: [.token(.regexPoundDelimiter)]), isOptional: true ), @@ -1434,7 +1434,7 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Elements", + name: "elements", kind: .collection(kind: .exprList, collectionElementName: "Element") ) ] @@ -1447,11 +1447,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), Child( - name: "GenericArgumentClause", + name: "genericArgumentClause", kind: .node(kind: .genericArgumentClause) ), ] @@ -1464,28 +1464,28 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "string literal", children: [ Child( - name: "OpeningPounds", - deprecatedName: "OpenDelimiter", + name: "openingPounds", + deprecatedName: "openDelimiter", kind: .token(choices: [.token(.rawStringPoundDelimiter)]), isOptional: true ), Child( - name: "OpeningQuote", - deprecatedName: "OpenQuote", + name: "openingQuote", + deprecatedName: "openQuote", kind: .token(choices: [.token(.stringQuote), .token(.multilineStringQuote), .token(.singleQuote)]) ), Child( - name: "Segments", + name: "segments", kind: .collection(kind: .stringLiteralSegmentList, collectionElementName: "Segment") ), Child( - name: "ClosingQuote", - deprecatedName: "CloseQuote", + name: "closingQuote", + deprecatedName: "closeQuote", kind: .token(choices: [.token(.stringQuote), .token(.multilineStringQuote), .token(.singleQuote)]) ), Child( - name: "ClosingPounds", - deprecatedName: "CloseDelimiter", + name: "closingPounds", + deprecatedName: "closeDelimiter", kind: .token(choices: [.token(.rawStringPoundDelimiter)]), isOptional: true ), @@ -1506,17 +1506,17 @@ public let EXPR_NODES: [Node] = [ documentation: "A simple string that can’t contain string interpolation and cannot have raw string delimiters.", children: [ Child( - name: "OpeningQuote", + name: "openingQuote", kind: .token(choices: [.token(.stringQuote), .token(.multilineStringQuote)]), documentation: "Open quote for the string literal" ), Child( - name: "Segments", + name: "segments", kind: .collection(kind: .simpleStringLiteralSegmentList, collectionElementName: "Segment"), documentation: "String content" ), Child( - name: "ClosingQuote", + name: "closingQuote", kind: .token(choices: [.token(.stringQuote), .token(.multilineStringQuote)]), documentation: "Close quote for the string literal" ), @@ -1538,7 +1538,7 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Content", + name: "content", kind: .token(choices: [.token(.stringSegment)]) ) ] @@ -1551,34 +1551,34 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "subscript", children: [ Child( - name: "CalledExpression", + name: "calledExpression", kind: .node(kind: .expr), nameForDiagnostics: "called expression" ), Child( - name: "LeftSquare", - deprecatedName: "LeftBracket", + name: "leftSquare", + deprecatedName: "leftBracket", kind: .token(choices: [.token(.leftSquare)]) ), Child( - name: "Arguments", - deprecatedName: "ArgumentList", + name: "arguments", + deprecatedName: "argumentList", kind: .collection(kind: .labeledExprList, collectionElementName: "Argument"), nameForDiagnostics: "arguments" ), Child( - name: "RightSquare", - deprecatedName: "RightBracket", + name: "rightSquare", + deprecatedName: "rightBracket", kind: .token(choices: [.token(.rightSquare)]) ), Child( - name: "TrailingClosure", + name: "trailingClosure", kind: .node(kind: .closureExpr), nameForDiagnostics: "trailing closure", isOptional: true ), Child( - name: "AdditionalTrailingClosures", + name: "additionalTrailingClosures", kind: .collection(kind: .multipleTrailingClosureElementList, collectionElementName: "AdditionalTrailingClosure", defaultsToEmpty: true), nameForDiagnostics: "trailing closures" ), @@ -1592,7 +1592,7 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "SuperKeyword", + name: "superKeyword", kind: .token(choices: [.keyword(text: "super")]) ) ] @@ -1605,15 +1605,15 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "CaseKeyword", + name: "caseKeyword", kind: .token(choices: [.keyword(text: "case")]) ), Child( - name: "CaseItems", + name: "caseItems", kind: .collection(kind: .switchCaseItemList, collectionElementName: "CaseItem") ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)], requiresTrailingSpace: false) ), ] @@ -1637,28 +1637,28 @@ public let EXPR_NODES: [Node] = [ traits: ["WithStatements"], children: [ Child( - name: "Attribute", - deprecatedName: "UnknownAttr", + name: "attribute", + deprecatedName: "unknownAttr", kind: .node(kind: .attribute), documentation: "The `@unknown` attribute of a default label, if present.", isOptional: true ), Child( - name: "Label", + name: "label", kind: .nodeChoices(choices: [ Child( - name: "Default", + name: "default", kind: .node(kind: .switchDefaultLabel) ), Child( - name: "Case", + name: "case", kind: .node(kind: .switchCaseLabel) ), ]), nameForDiagnostics: "label" ), Child( - name: "Statements", + name: "statements", kind: .collection(kind: .codeBlockItemList, collectionElementName: "Statement") ), ] @@ -1671,11 +1671,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "DefaultKeyword", + name: "defaultKeyword", kind: .token(choices: [.keyword(text: "default")]) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)], requiresTrailingSpace: false) ), ] @@ -1695,24 +1695,24 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "SwitchKeyword", + name: "switchKeyword", kind: .token(choices: [.keyword(text: "switch")]) ), Child( - name: "Subject", - deprecatedName: "Expression", + name: "subject", + deprecatedName: "expression", kind: .node(kind: .expr) ), Child( - name: "LeftBrace", + name: "leftBrace", kind: .token(choices: [.token(.leftBrace)]) ), Child( - name: "Cases", + name: "cases", kind: .collection(kind: .switchCaseList, collectionElementName: "Case") ), Child( - name: "RightBrace", + name: "rightBrace", kind: .token(choices: [.token(.rightBrace)]) ), ] @@ -1728,29 +1728,29 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "ternay expression", children: [ Child( - name: "Condition", - deprecatedName: "ConditionExpression", + name: "condition", + deprecatedName: "conditionExpression", kind: .node(kind: .expr), nameForDiagnostics: "condition" ), Child( - name: "QuestionMark", + name: "questionMark", kind: .token(choices: [.token(.infixQuestionMark)]) ), Child( - name: "ThenExpression", - deprecatedName: "FirstChoice", + name: "thenExpression", + deprecatedName: "firstChoice", kind: .node(kind: .expr), nameForDiagnostics: "first choice" ), Child( - name: "Colon", - deprecatedName: "ColonMark", + name: "colon", + deprecatedName: "colonMark", kind: .token(choices: [.token(.colon)]) ), Child( - name: "ElseExpression", - deprecatedName: "SecondChoice", + name: "elseExpression", + deprecatedName: "secondChoice", kind: .node(kind: .expr), nameForDiagnostics: "second choice" ), @@ -1767,16 +1767,16 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "'try' expression", children: [ Child( - name: "TryKeyword", + name: "tryKeyword", kind: .token(choices: [.keyword(text: "try")]) ), Child( - name: "QuestionOrExclamationMark", + name: "questionOrExclamationMark", kind: .token(choices: [.token(.postfixQuestionMark), .token(.exclamationMark)], requiresTrailingSpace: true), isOptional: true ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), ] @@ -1799,23 +1799,23 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "Label", + name: "label", kind: .token(choices: [.token(.identifier), .token(.wildcard)]), nameForDiagnostics: "label", isOptional: true ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), isOptional: true ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr), nameForDiagnostics: "value" ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -1831,16 +1831,16 @@ public let EXPR_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Elements", - deprecatedName: "ElementList", + name: "elements", + deprecatedName: "elementList", kind: .collection(kind: .labeledExprList, collectionElementName: "Element") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -1853,7 +1853,7 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Type", + name: "type", kind: .node(kind: .type) ) ] @@ -1868,12 +1868,12 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "'as'", children: [ Child( - name: "AsKeyword", - deprecatedName: "AsTok", + name: "asKeyword", + deprecatedName: "asTok", kind: .token(choices: [.keyword(text: "as")]) ), Child( - name: "QuestionOrExclamationMark", + name: "questionOrExclamationMark", kind: .token(choices: [.token(.postfixQuestionMark), .token(.exclamationMark)]), isOptional: true ), @@ -1889,8 +1889,8 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "'is'", children: [ Child( - name: "IsKeyword", - deprecatedName: "IsTok", + name: "isKeyword", + deprecatedName: "isTok", kind: .token(choices: [.keyword(text: "is")]) ) ] @@ -1902,7 +1902,7 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Pattern", + name: "pattern", kind: .node(kind: .pattern) ) ] @@ -1917,17 +1917,17 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: "ternary operator", children: [ Child( - name: "QuestionMark", + name: "questionMark", kind: .token(choices: [.token(.infixQuestionMark)]) ), Child( - name: "ThenExpression", - deprecatedName: "FirstChoice", + name: "thenExpression", + deprecatedName: "firstChoice", kind: .node(kind: .expr) ), Child( - name: "Colon", - deprecatedName: "ColonMark", + name: "colon", + deprecatedName: "colonMark", kind: .token(choices: [.token(.colon)]) ), ] @@ -1939,11 +1939,11 @@ public let EXPR_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]), isOptional: true ), diff --git a/CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift b/CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift index 4934f2b798e..1930e036dbc 100644 --- a/CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift @@ -18,17 +18,17 @@ public let GENERIC_NODES: [Node] = [ nameForDiagnostics: "conformance requirement", children: [ Child( - name: "LeftType", - deprecatedName: "LeftTypeIdentifier", + name: "leftType", + deprecatedName: "leftTypeIdentifier", kind: .node(kind: .type) ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "RightType", - deprecatedName: "RightTypeIdentifier", + name: "rightType", + deprecatedName: "rightTypeIdentifier", kind: .node(kind: .type) ), ] @@ -43,26 +43,26 @@ public let GENERIC_NODES: [Node] = [ parserFunction: "parseGenericParameters", children: [ Child( - name: "LeftAngle", - deprecatedName: "LeftAngleBracket", + name: "leftAngle", + deprecatedName: "leftAngleBracket", kind: .token(choices: [.token(.leftAngle)]), documentation: "The opening angle bracket (`<`) of the generic parameter clause." ), Child( - name: "Parameters", - deprecatedName: "GenericParameterList", + name: "parameters", + deprecatedName: "genericParameterList", kind: .collection(kind: .genericParameterList, collectionElementName: "Parameter", deprecatedCollectionElementName: "GenericParameter"), documentation: "The list of generic parameters in the clause." ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", isOptional: true ), Child( - name: "RightAngle", - deprecatedName: "RightAngleBracket", + name: "rightAngle", + deprecatedName: "rightAngleBracket", kind: .token(choices: [.token(.rightAngle)]), documentation: "The closing angle bracket (`>`) of the generic parameter clause." ), @@ -89,34 +89,34 @@ public let GENERIC_NODES: [Node] = [ ], children: [ Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true) ), Child( - name: "EachKeyword", - deprecatedName: "Each", + name: "eachKeyword", + deprecatedName: "each", kind: .token(choices: [.keyword(text: "each")]), nameForDiagnostics: "parameter pack specifier", isOptional: true ), Child( - name: "Name", + name: "name", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "name" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), isOptional: true ), Child( - name: "InheritedType", + name: "inheritedType", kind: .node(kind: .type), nameForDiagnostics: "inherited type", isOptional: true ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -141,25 +141,25 @@ public let GENERIC_NODES: [Node] = [ ], children: [ Child( - name: "Requirement", - deprecatedName: "Body", + name: "requirement", + deprecatedName: "body", kind: .nodeChoices(choices: [ Child( - name: "SameTypeRequirement", + name: "sameTypeRequirement", kind: .node(kind: .sameTypeRequirement) ), Child( - name: "ConformanceRequirement", + name: "conformanceRequirement", kind: .node(kind: .conformanceRequirement) ), Child( - name: "LayoutRequirement", + name: "layoutRequirement", kind: .node(kind: .layoutRequirement) ), ]) ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -174,13 +174,13 @@ public let GENERIC_NODES: [Node] = [ documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", children: [ Child( - name: "WhereKeyword", + name: "whereKeyword", kind: .token(choices: [.keyword(text: "where")]), documentation: "The `where` keyword in the clause." ), Child( - name: "Requirements", - deprecatedName: "RequirementList", + name: "requirements", + deprecatedName: "requirementList", kind: .collection(kind: .genericRequirementList, collectionElementName: "Requirement"), documentation: "The list of requirements in the clause." ), @@ -195,18 +195,18 @@ public let GENERIC_NODES: [Node] = [ nameForDiagnostics: "layout requirement", children: [ Child( - name: "Type", - deprecatedName: "TypeIdentifier", + name: "type", + deprecatedName: "typeIdentifier", kind: .node(kind: .type), nameForDiagnostics: "constrained type" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "LayoutSpecifier", - deprecatedName: "LayoutConstraint", + name: "layoutSpecifier", + deprecatedName: "layoutConstraint", kind: .token(choices: [ .keyword(text: "_Trivial"), .keyword(text: "_TrivialAtMost"), @@ -218,29 +218,29 @@ public let GENERIC_NODES: [Node] = [ ]) ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]), isOptional: true ), Child( - name: "Size", + name: "size", kind: .token(choices: [.token(.integerLiteral)]), nameForDiagnostics: "size", isOptional: true ), Child( - name: "Comma", + name: "comma", kind: .token(choices: [.token(.comma)]), isOptional: true ), Child( - name: "Alignment", + name: "alignment", kind: .token(choices: [.token(.integerLiteral)]), nameForDiagnostics: "alignment", isOptional: true ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]), isOptional: true ), @@ -254,18 +254,18 @@ public let GENERIC_NODES: [Node] = [ nameForDiagnostics: "primary associated type clause", children: [ Child( - name: "LeftAngle", - deprecatedName: "LeftAngleBracket", + name: "leftAngle", + deprecatedName: "leftAngleBracket", kind: .token(choices: [.token(.leftAngle)]) ), Child( - name: "PrimaryAssociatedTypes", - deprecatedName: "PrimaryAssociatedTypeList", + name: "primaryAssociatedTypes", + deprecatedName: "primaryAssociatedTypeList", kind: .collection(kind: .primaryAssociatedTypeList, collectionElementName: "PrimaryAssociatedType") ), Child( - name: "RightAngle", - deprecatedName: "RightAngleBracket", + name: "rightAngle", + deprecatedName: "rightAngleBracket", kind: .token(choices: [.token(.rightAngle)]) ), ] @@ -288,12 +288,12 @@ public let GENERIC_NODES: [Node] = [ ], children: [ Child( - name: "Name", + name: "name", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "name" ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -307,19 +307,19 @@ public let GENERIC_NODES: [Node] = [ nameForDiagnostics: "same type requirement", children: [ Child( - name: "LeftType", - deprecatedName: "LeftTypeIdentifier", + name: "leftType", + deprecatedName: "leftTypeIdentifier", kind: .node(kind: .type), nameForDiagnostics: "left-hand type" ), Child( - name: "Equal", - deprecatedName: "EqualityToken", + name: "equal", + deprecatedName: "equalityToken", kind: .token(choices: [.token(.binaryOperator), .token(.prefixOperator), .token(.postfixOperator)]) ), Child( - name: "RightType", - deprecatedName: "RightTypeIdentifier", + name: "rightType", + deprecatedName: "rightTypeIdentifier", kind: .node(kind: .type), nameForDiagnostics: "right-hand type" ), diff --git a/CodeGeneration/Sources/SyntaxSupport/Node.swift b/CodeGeneration/Sources/SyntaxSupport/Node.swift index 8295adc6614..4451856765b 100644 --- a/CodeGeneration/Sources/SyntaxSupport/Node.swift +++ b/CodeGeneration/Sources/SyntaxSupport/Node.swift @@ -127,7 +127,7 @@ public class Node { let childrenWithUnexpected: [Child] if children.isEmpty { childrenWithUnexpected = [ - Child(name: "Unexpected", kind: .collection(kind: .unexpectedNodes, collectionElementName: "Unexpected"), isOptional: true) + Child(name: "unexpected", kind: .collection(kind: .unexpectedNodes, collectionElementName: "Unexpected"), isOptional: true) ] } else { // Add implicitly generated UnexpectedNodes children between @@ -140,14 +140,14 @@ public class Node { let unexpectedDeprecatedName: String? if i == 0 { - unexpectedName = "UnexpectedBefore\(childName)" - unexpectedDeprecatedName = child.deprecatedName.map { "UnexpectedBefore\($0.withFirstCharacterUppercased)" } + unexpectedName = "unexpectedBefore\(childName)" + unexpectedDeprecatedName = child.deprecatedName.map { "unexpectedBefore\($0.withFirstCharacterUppercased)" } } else { - unexpectedName = "UnexpectedBetween\(children[i - 1].name.withFirstCharacterUppercased)And\(childName)" + unexpectedName = "unexpectedBetween\(children[i - 1].name.withFirstCharacterUppercased)And\(childName)" if let deprecatedName = children[i - 1].deprecatedName?.withFirstCharacterUppercased { - unexpectedDeprecatedName = "UnexpectedBetween\(deprecatedName)And\(child.deprecatedName?.withFirstCharacterUppercased ?? childName)" + unexpectedDeprecatedName = "unexpectedBetween\(deprecatedName)And\(child.deprecatedName?.withFirstCharacterUppercased ?? childName)" } else if let deprecatedName = child.deprecatedName?.withFirstCharacterUppercased { - unexpectedDeprecatedName = "UnexpectedBetween\(children[i - 1].name.withFirstCharacterUppercased)And\(deprecatedName)" + unexpectedDeprecatedName = "unexpectedBetween\(children[i - 1].name.withFirstCharacterUppercased)And\(deprecatedName)" } else { unexpectedDeprecatedName = nil } @@ -161,8 +161,8 @@ public class Node { return [unexpectedBefore, child] } + [ Child( - name: "UnexpectedAfter\(children.last!.name.withFirstCharacterUppercased)", - deprecatedName: children.last!.deprecatedName.map { "UnexpectedAfter\($0.withFirstCharacterUppercased)" }, + name: "unexpectedAfter\(children.last!.name.withFirstCharacterUppercased)", + deprecatedName: children.last!.deprecatedName.map { "unexpectedAfter\($0.withFirstCharacterUppercased)" }, kind: .collection(kind: .unexpectedNodes, collectionElementName: "UnexpectedAfter\(children.last!.name.withFirstCharacterUppercased)"), isOptional: true ) diff --git a/CodeGeneration/Sources/SyntaxSupport/PatternNodes.swift b/CodeGeneration/Sources/SyntaxSupport/PatternNodes.swift index 025e188f4d4..ecccbdceab1 100644 --- a/CodeGeneration/Sources/SyntaxSupport/PatternNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/PatternNodes.swift @@ -18,7 +18,7 @@ public let PATTERN_NODES: [Node] = [ nameForDiagnostics: "pattern", children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ) ] @@ -30,7 +30,7 @@ public let PATTERN_NODES: [Node] = [ nameForDiagnostics: "pattern", children: [ Child( - name: "Identifier", + name: "identifier", kind: .token(choices: [.token(.identifier), .keyword(text: "self"), .keyword(text: "init")]) ) ] @@ -43,11 +43,11 @@ public let PATTERN_NODES: [Node] = [ nameForDiagnostics: "'is' pattern", children: [ Child( - name: "IsKeyword", + name: "isKeyword", kind: .token(choices: [.keyword(text: "is")]) ), Child( - name: "Type", + name: "type", kind: .node(kind: .type) ), ] @@ -72,24 +72,24 @@ public let PATTERN_NODES: [Node] = [ ], children: [ Child( - name: "Label", - deprecatedName: "LabelName", + name: "label", + deprecatedName: "labelName", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "label", isOptional: true ), Child( - name: "Colon", - deprecatedName: "LabelColon", + name: "colon", + deprecatedName: "labelColon", kind: .token(choices: [.token(.colon)]), isOptional: true ), Child( - name: "Pattern", + name: "pattern", kind: .node(kind: .pattern) ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -106,15 +106,15 @@ public let PATTERN_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Elements", + name: "elements", kind: .collection(kind: .tuplePatternElementList, collectionElementName: "Element") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -127,11 +127,11 @@ public let PATTERN_NODES: [Node] = [ nameForDiagnostics: "type annotation", children: [ Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Type", + name: "type", kind: .node(kind: .type) ), ] @@ -146,13 +146,13 @@ public let PATTERN_NODES: [Node] = [ nameForDiagnostics: "value binding pattern", children: [ Child( - name: "BindingSpecifier", - deprecatedName: "BindingKeyword", + name: "bindingSpecifier", + deprecatedName: "bindingKeyword", kind: .token(choices: [.keyword(text: "let"), .keyword(text: "var"), .keyword(text: "inout")]) ), Child( - name: "Pattern", - deprecatedName: "ValuePattern", + name: "pattern", + deprecatedName: "valuePattern", kind: .node(kind: .pattern) ), ] @@ -165,11 +165,11 @@ public let PATTERN_NODES: [Node] = [ nameForDiagnostics: "wildcard pattern", children: [ Child( - name: "Wildcard", + name: "wildcard", kind: .token(choices: [.token(.wildcard)]) ), Child( - name: "TypeAnnotation", + name: "typeAnnotation", kind: .node(kind: .typeAnnotation), isOptional: true ), diff --git a/CodeGeneration/Sources/SyntaxSupport/StmtNodes.swift b/CodeGeneration/Sources/SyntaxSupport/StmtNodes.swift index f69e571f6f1..f92f99ab913 100644 --- a/CodeGeneration/Sources/SyntaxSupport/StmtNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/StmtNodes.swift @@ -18,20 +18,20 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "availability condition", children: [ Child( - name: "AvailabilityKeyword", + name: "availabilityKeyword", kind: .token(choices: [.token(.poundAvailable), .token(.poundUnavailable)]) ), Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "AvailabilityArguments", - deprecatedName: "AvailabilitySpec", + name: "availabilityArguments", + deprecatedName: "availabilitySpec", kind: .collection(kind: .availabilityArgumentList, collectionElementName: "AvailabilityArgument") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -44,11 +44,11 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "'break' statement", children: [ Child( - name: "BreakKeyword", + name: "breakKeyword", kind: .token(choices: [.keyword(text: "break")], requiresTrailingSpace: false) ), Child( - name: "Label", + name: "label", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "label", isOptional: true @@ -81,15 +81,15 @@ public let STMT_NODES: [Node] = [ traits: ["WithCodeBlock"], children: [ Child( - name: "CatchKeyword", + name: "catchKeyword", kind: .token(choices: [.keyword(text: "catch")]) ), Child( - name: "CatchItems", + name: "catchItems", kind: .collection(kind: .catchItemList, collectionElementName: "CatchItem", defaultsToEmpty: true) ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock) ), ] @@ -113,17 +113,17 @@ public let STMT_NODES: [Node] = [ ], children: [ Child( - name: "Pattern", + name: "pattern", kind: .node(kind: .pattern), isOptional: true ), Child( - name: "WhereClause", + name: "whereClause", kind: .node(kind: .whereClause), isOptional: true ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -152,28 +152,28 @@ public let STMT_NODES: [Node] = [ ], children: [ Child( - name: "Condition", + name: "condition", kind: .nodeChoices(choices: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), Child( - name: "Availability", + name: "availability", kind: .node(kind: .availabilityCondition) ), Child( - name: "MatchingPattern", + name: "matchingPattern", kind: .node(kind: .matchingPatternCondition) ), Child( - name: "OptionalBinding", + name: "optionalBinding", kind: .node(kind: .optionalBindingCondition) ), ]) ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -187,11 +187,11 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "'continue' statement", children: [ Child( - name: "ContinueKeyword", + name: "continueKeyword", kind: .token(choices: [.keyword(text: "continue")]) ), Child( - name: "Label", + name: "label", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "label", isOptional: true @@ -209,11 +209,11 @@ public let STMT_NODES: [Node] = [ ], children: [ Child( - name: "DeferKeyword", + name: "deferKeyword", kind: .token(choices: [.keyword(text: "defer")]) ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock) ), ] @@ -229,16 +229,16 @@ public let STMT_NODES: [Node] = [ ], children: [ Child( - name: "DoKeyword", + name: "doKeyword", kind: .token(choices: [.keyword(text: "do")]) ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock), nameForDiagnostics: "body" ), Child( - name: "CatchClauses", + name: "catchClauses", kind: .collection(kind: .catchClauseList, collectionElementName: "CatchClause", defaultsToEmpty: true) ), ] @@ -251,7 +251,7 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "expression", children: [ Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ) ] @@ -264,7 +264,7 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "'fallthrough' statement", children: [ Child( - name: "FallthroughKeyword", + name: "fallthroughKeyword", kind: .token(choices: [.keyword(text: "fallthrough")]) ) ] @@ -282,49 +282,49 @@ public let STMT_NODES: [Node] = [ ], children: [ Child( - name: "ForKeyword", + name: "forKeyword", kind: .token(choices: [.keyword(text: "for")]) ), Child( - name: "TryKeyword", + name: "tryKeyword", kind: .token(choices: [.keyword(text: "try")]), isOptional: true ), Child( - name: "AwaitKeyword", + name: "awaitKeyword", kind: .token(choices: [.keyword(text: "await")]), isOptional: true ), Child( - name: "CaseKeyword", + name: "caseKeyword", kind: .token(choices: [.keyword(text: "case")]), isOptional: true ), Child( - name: "Pattern", + name: "pattern", kind: .node(kind: .pattern) ), Child( - name: "TypeAnnotation", + name: "typeAnnotation", kind: .node(kind: .typeAnnotation), isOptional: true ), Child( - name: "InKeyword", + name: "inKeyword", kind: .token(choices: [.keyword(text: "in")]) ), Child( - name: "Sequence", - deprecatedName: "SequenceExpr", + name: "sequence", + deprecatedName: "sequenceExpr", kind: .node(kind: .expr) ), Child( - name: "WhereClause", + name: "whereClause", kind: .node(kind: .whereClause), isOptional: true ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock), nameForDiagnostics: "body" ), @@ -338,11 +338,11 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "'discard' statement", children: [ Child( - name: "DiscardKeyword", + name: "discardKeyword", kind: .token(choices: [.keyword(text: "discard")]) ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), ] @@ -358,20 +358,20 @@ public let STMT_NODES: [Node] = [ ], children: [ Child( - name: "GuardKeyword", + name: "guardKeyword", kind: .token(choices: [.keyword(text: "guard")]) ), Child( - name: "Conditions", + name: "conditions", kind: .collection(kind: .conditionElementList, collectionElementName: "Condition"), nameForDiagnostics: "condition" ), Child( - name: "ElseKeyword", + name: "elseKeyword", kind: .token(choices: [.keyword(text: "else")]) ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock), nameForDiagnostics: "body" ), @@ -385,18 +385,18 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "labeled statement", children: [ Child( - name: "Label", - deprecatedName: "LabelName", + name: "label", + deprecatedName: "labelName", kind: .token(choices: [.token(.identifier)]), nameForDiagnostics: "label name" ), Child( - name: "Colon", - deprecatedName: "LabelColon", + name: "colon", + deprecatedName: "labelColon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Statement", + name: "statement", kind: .node(kind: .stmt) ), ] @@ -408,20 +408,20 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "pattern matching", children: [ Child( - name: "CaseKeyword", + name: "caseKeyword", kind: .token(choices: [.keyword(text: "case")]) ), Child( - name: "Pattern", + name: "pattern", kind: .node(kind: .pattern) ), Child( - name: "TypeAnnotation", + name: "typeAnnotation", kind: .node(kind: .typeAnnotation), isOptional: true ), Child( - name: "Initializer", + name: "initializer", kind: .node(kind: .initializerClause) ), ] @@ -433,21 +433,21 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "optional binding", children: [ Child( - name: "BindingSpecifier", - deprecatedName: "BindingKeyword", + name: "bindingSpecifier", + deprecatedName: "bindingKeyword", kind: .token(choices: [.keyword(text: "let"), .keyword(text: "var"), .keyword(text: "inout")]) ), Child( - name: "Pattern", + name: "pattern", kind: .node(kind: .pattern) ), Child( - name: "TypeAnnotation", + name: "typeAnnotation", kind: .node(kind: .typeAnnotation), isOptional: true ), Child( - name: "Initializer", + name: "initializer", kind: .node(kind: .initializerClause), isOptional: true ), @@ -464,20 +464,20 @@ public let STMT_NODES: [Node] = [ ], children: [ Child( - name: "RepeatKeyword", + name: "repeatKeyword", kind: .token(choices: [.keyword(text: "repeat")]) ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock), nameForDiagnostics: "body" ), Child( - name: "WhileKeyword", + name: "whileKeyword", kind: .token(choices: [.keyword(text: "while")]) ), Child( - name: "Condition", + name: "condition", kind: .node(kind: .expr), nameForDiagnostics: "condition" ), @@ -491,11 +491,11 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "'return' statement", children: [ Child( - name: "ReturnKeyword", + name: "returnKeyword", kind: .token(choices: [.keyword(text: "return")]) ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr), isOptional: true ), @@ -509,11 +509,11 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "'throw' statement", children: [ Child( - name: "ThrowKeyword", + name: "throwKeyword", kind: .token(choices: [.keyword(text: "throw")]) ), Child( - name: "Expression", + name: "expression", kind: .node(kind: .expr) ), ] @@ -525,12 +525,12 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "'where' clause", children: [ Child( - name: "WhereKeyword", + name: "whereKeyword", kind: .token(choices: [.keyword(text: "where")]) ), Child( - name: "Condition", - deprecatedName: "GuardResult", + name: "condition", + deprecatedName: "guardResult", kind: .node(kind: .expr) ), ] @@ -546,15 +546,15 @@ public let STMT_NODES: [Node] = [ ], children: [ Child( - name: "WhileKeyword", + name: "whileKeyword", kind: .token(choices: [.keyword(text: "while")]) ), Child( - name: "Conditions", + name: "conditions", kind: .collection(kind: .conditionElementList, collectionElementName: "Condition") ), Child( - name: "Body", + name: "body", kind: .node(kind: .codeBlock) ), ] @@ -566,16 +566,16 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Elements", - deprecatedName: "ElementList", + name: "elements", + deprecatedName: "elementList", kind: .collection(kind: .yieldedExpressionList, collectionElementName: "Element") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] @@ -588,21 +588,21 @@ public let STMT_NODES: [Node] = [ nameForDiagnostics: "'yield' statement", children: [ Child( - name: "YieldKeyword", + name: "yieldKeyword", kind: .token(choices: [.keyword(text: "yield")]) ), Child( - name: "YieldedExpressions", - deprecatedName: "Yields", + name: "yieldedExpressions", + deprecatedName: "yields", kind: .nodeChoices(choices: [ Child( - name: "Multiple", - deprecatedName: "YieldList", + name: "multiple", + deprecatedName: "yieldList", kind: .node(kind: .yieldedExpressionsClause) ), Child( - name: "Single", - deprecatedName: "SimpleYield", + name: "single", + deprecatedName: "simpleYield", kind: .node(kind: .expr) ), ]) diff --git a/CodeGeneration/Sources/SyntaxSupport/Traits.swift b/CodeGeneration/Sources/SyntaxSupport/Traits.swift index ec354825034..aee4790b956 100644 --- a/CodeGeneration/Sources/SyntaxSupport/Traits.swift +++ b/CodeGeneration/Sources/SyntaxSupport/Traits.swift @@ -30,52 +30,52 @@ public let TRAITS: [Trait] = [ Trait( traitName: "Braced", children: [ - Child(name: "LeftBrace", kind: .token(choices: [.token(.leftBrace)])), - Child(name: "RightBrace", kind: .token(choices: [.token(.rightBrace)])), + Child(name: "leftBrace", kind: .token(choices: [.token(.leftBrace)])), + Child(name: "rightBrace", kind: .token(choices: [.token(.rightBrace)])), ] ), Trait( traitName: "DeclGroup", children: [ - Child(name: "Attributes", kind: .node(kind: .attributeList)), - Child(name: "Modifiers", kind: .node(kind: .declModifierList)), - Child(name: "InheritanceClause", kind: .node(kind: .inheritanceClause), isOptional: true), + Child(name: "attributes", kind: .node(kind: .attributeList)), + Child(name: "modifiers", kind: .node(kind: .declModifierList)), + Child(name: "inheritanceClause", kind: .node(kind: .inheritanceClause), isOptional: true), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", isOptional: true ), - Child(name: "MemberBlock", kind: .node(kind: .memberBlock)), + Child(name: "memberBlock", kind: .node(kind: .memberBlock)), ] ), Trait( traitName: "EffectSpecifiers", children: [ - Child(name: "UnexpectedBeforeAsyncSpecifier", kind: .node(kind: .unexpectedNodes), isOptional: true), - Child(name: "AsyncSpecifier", kind: .token(choices: [.keyword(text: "async"), .keyword(text: "reasync")]), isOptional: true), - Child(name: "UnexpectedBetweenAsyncSpecifierAndThrowsSpecifier", kind: .node(kind: .unexpectedNodes), isOptional: true), - Child(name: "ThrowsSpecifier", kind: .token(choices: [.keyword(text: "throws"), .keyword(text: "rethrows")]), isOptional: true), - Child(name: "UnexpectedAfterThrowsSpecifier", kind: .node(kind: .unexpectedNodes), isOptional: true), + Child(name: "unexpectedBeforeAsyncSpecifier", kind: .node(kind: .unexpectedNodes), isOptional: true), + Child(name: "asyncSpecifier", kind: .token(choices: [.keyword(text: "async"), .keyword(text: "reasync")]), isOptional: true), + Child(name: "unexpectedBetweenAsyncSpecifierAndThrowsSpecifier", kind: .node(kind: .unexpectedNodes), isOptional: true), + Child(name: "throwsSpecifier", kind: .token(choices: [.keyword(text: "throws"), .keyword(text: "rethrows")]), isOptional: true), + Child(name: "unexpectedAfterThrowsSpecifier", kind: .node(kind: .unexpectedNodes), isOptional: true), ] ), Trait( traitName: "FreestandingMacroExpansion", children: [ - Child(name: "PoundToken", kind: .token(choices: [.token(.pound)])), - Child(name: "Macro", kind: .token(choices: [.token(.identifier)])), - Child(name: "GenericArgumentClause", kind: .node(kind: .genericArgumentClause), isOptional: true), - Child(name: "LeftParen", kind: .token(choices: [.token(.leftParen)]), isOptional: true), - Child(name: "ArgumentList", kind: .node(kind: .labeledExprList)), - Child(name: "RightParen", kind: .token(choices: [.token(.rightParen)]), isOptional: true), - Child(name: "TrailingClosure", kind: .node(kind: .closureExpr), isOptional: true), - Child(name: "AdditionalTrailingClosures", kind: .node(kind: .multipleTrailingClosureElementList)), + Child(name: "poundToken", kind: .token(choices: [.token(.pound)])), + Child(name: "macro", kind: .token(choices: [.token(.identifier)])), + Child(name: "genericArgumentClause", kind: .node(kind: .genericArgumentClause), isOptional: true), + Child(name: "leftParen", kind: .token(choices: [.token(.leftParen)]), isOptional: true), + Child(name: "argumentList", kind: .node(kind: .labeledExprList)), + Child(name: "rightParen", kind: .token(choices: [.token(.rightParen)]), isOptional: true), + Child(name: "trailingClosure", kind: .node(kind: .closureExpr), isOptional: true), + Child(name: "additionalTrailingClosures", kind: .node(kind: .multipleTrailingClosureElementList)), ] ), Trait( traitName: "NamedDecl", children: [ - Child(name: "Name", kind: .token(choices: [.token(.identifier)])) + Child(name: "name", kind: .token(choices: [.token(.identifier)])) ] ), Trait( @@ -87,7 +87,7 @@ public let TRAITS: [Trait] = [ """, children: [ Child( - name: "Placeholder", + name: "placeholder", kind: .token(choices: [.token(.identifier)]), documentation: """ A placeholder, i.e. `<#placeholder#>`, that can be inserted into the source code to represent the missing node. @@ -98,20 +98,20 @@ public let TRAITS: [Trait] = [ Trait( traitName: "Parenthesized", children: [ - Child(name: "LeftParen", kind: .token(choices: [.token(.leftParen)])), - Child(name: "RightParen", kind: .token(choices: [.token(.rightParen)])), + Child(name: "leftParen", kind: .token(choices: [.token(.leftParen)])), + Child(name: "rightParen", kind: .token(choices: [.token(.rightParen)])), ] ), Trait( traitName: "WithAttributes", children: [ - Child(name: "Attributes", kind: .node(kind: .attributeList)) + Child(name: "attributes", kind: .node(kind: .attributeList)) ] ), Trait( traitName: "WithCodeBlock", children: [ - Child(name: "Body", kind: .node(kind: .codeBlock)) + Child(name: "body", kind: .node(kind: .codeBlock)) ] ), Trait( @@ -124,13 +124,13 @@ public let TRAITS: [Trait] = [ """, children: [ Child( - name: "GenericParameterClause", + name: "genericParameterClause", kind: .node(kind: .genericParameterClause), documentation: "The parameter clause that defines the generic parameters.", isOptional: true ), Child( - name: "GenericWhereClause", + name: "genericWhereClause", kind: .node(kind: .genericWhereClause), documentation: "A `where` clause that places additional constraints on generic parameters like `where Element: Hashable`.", isOptional: true @@ -140,19 +140,19 @@ public let TRAITS: [Trait] = [ Trait( traitName: "WithModifiers", children: [ - Child(name: "Modifiers", kind: .node(kind: .declModifierList)) + Child(name: "modifiers", kind: .node(kind: .declModifierList)) ] ), Trait( traitName: "WithStatements", children: [ - Child(name: "Statements", kind: .node(kind: .codeBlockItemList)) + Child(name: "statements", kind: .node(kind: .codeBlockItemList)) ] ), Trait( traitName: "WithTrailingComma", children: [ - Child(name: "TrailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true) + Child(name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true) ] ), ] diff --git a/CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift b/CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift index 1e826848fd5..a0d46bc3585 100644 --- a/CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift @@ -18,18 +18,18 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "array type", children: [ Child( - name: "LeftSquare", - deprecatedName: "LeftSquareBracket", + name: "leftSquare", + deprecatedName: "leftSquareBracket", kind: .token(choices: [.token(.leftSquare)]) ), Child( - name: "Element", - deprecatedName: "ElementType", + name: "element", + deprecatedName: "elementType", kind: .node(kind: .type) ), Child( - name: "RightSquare", - deprecatedName: "RightSquareBracket", + name: "rightSquare", + deprecatedName: "rightSquareBracket", kind: .token(choices: [.token(.rightSquare)]) ), ] @@ -46,7 +46,7 @@ public let TYPE_NODES: [Node] = [ ], children: [ Child( - name: "Specifier", + name: "specifier", kind: .token(choices: [ .keyword(text: "inout"), .keyword(text: "__shared"), @@ -59,11 +59,11 @@ public let TYPE_NODES: [Node] = [ isOptional: true ), Child( - name: "Attributes", + name: "attributes", kind: .collection(kind: .attributeList, collectionElementName: "Attribute", defaultsToEmpty: true) ), Child( - name: "BaseType", + name: "baseType", kind: .node(kind: .type) ), ] @@ -75,7 +75,7 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "ClassKeyword", + name: "classKeyword", kind: .token(choices: [.keyword(text: "class")]) ) ] @@ -97,11 +97,11 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: nil, children: [ Child( - name: "Type", + name: "type", kind: .node(kind: .type) ), Child( - name: "Ampersand", + name: "ampersand", kind: .node(kind: .token), isOptional: true ), @@ -115,7 +115,7 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "type composition", children: [ Child( - name: "Elements", + name: "elements", kind: .collection(kind: .compositionTypeElementList, collectionElementName: "Element") ) ] @@ -128,12 +128,12 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "type", children: [ Child( - name: "SomeOrAnySpecifier", + name: "someOrAnySpecifier", kind: .token(choices: [.keyword(text: "some"), .keyword(text: "any")]) ), Child( - name: "Constraint", - deprecatedName: "BaseType", + name: "constraint", + deprecatedName: "baseType", kind: .node(kind: .type) ), ] @@ -146,29 +146,29 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "dictionary type", children: [ Child( - name: "LeftSquare", - deprecatedName: "LeftSquareBracket", + name: "leftSquare", + deprecatedName: "leftSquareBracket", kind: .token(choices: [.token(.leftSquare)]) ), Child( - name: "Key", - deprecatedName: "KeyType", + name: "key", + deprecatedName: "keyType", kind: .node(kind: .type), nameForDiagnostics: "key type" ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]) ), Child( - name: "Value", - deprecatedName: "ValueType", + name: "value", + deprecatedName: "valueType", kind: .node(kind: .type), nameForDiagnostics: "value type" ), Child( - name: "RightSquare", - deprecatedName: "RightSquareBracket", + name: "rightSquare", + deprecatedName: "rightSquareBracket", kind: .token(choices: [.token(.rightSquare)]) ), ] @@ -186,26 +186,26 @@ public let TYPE_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Parameters", - deprecatedName: "Arguments", + name: "parameters", + deprecatedName: "arguments", kind: .collection(kind: .tupleTypeElementList, collectionElementName: "Parameter", deprecatedCollectionElementName: "Argument") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), Child( - name: "EffectSpecifiers", + name: "effectSpecifiers", kind: .node(kind: .typeEffectSpecifiers), isOptional: true ), Child( - name: "ReturnClause", - deprecatedName: "Output", + name: "returnClause", + deprecatedName: "output", kind: .node(kind: .returnClause) ), ] @@ -218,17 +218,17 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "generic argument clause", children: [ Child( - name: "LeftAngle", - deprecatedName: "LeftAngleBracket", + name: "leftAngle", + deprecatedName: "leftAngleBracket", kind: .token(choices: [.token(.leftAngle)]) ), Child( - name: "Arguments", + name: "arguments", kind: .collection(kind: .genericArgumentList, collectionElementName: "Argument") ), Child( - name: "RightAngle", - deprecatedName: "RightAngleBracket", + name: "rightAngle", + deprecatedName: "rightAngleBracket", kind: .token(choices: [.token(.rightAngle)]) ), ] @@ -254,12 +254,12 @@ public let TYPE_NODES: [Node] = [ ], children: [ Child( - name: "Argument", - deprecatedName: "ArgumentType", + name: "argument", + deprecatedName: "argumentType", kind: .node(kind: .type) ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -273,11 +273,11 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "implicitly unwrapped optional type", children: [ Child( - name: "WrappedType", + name: "wrappedType", kind: .node(kind: .type) ), Child( - name: "ExclamationMark", + name: "exclamationMark", kind: .token(choices: [.token(.exclamationMark)]) ), ] @@ -290,21 +290,21 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "member type", children: [ Child( - name: "BaseType", + name: "baseType", kind: .node(kind: .type), nameForDiagnostics: "base type" ), Child( - name: "Period", + name: "period", kind: .token(choices: [.token(.period)]) ), Child( - name: "Name", + name: "name", kind: .token(choices: [.token(.identifier), .keyword(text: "self"), .keyword(text: "Self")]), nameForDiagnostics: "name" ), Child( - name: "GenericArgumentClause", + name: "genericArgumentClause", kind: .node(kind: .genericArgumentClause), isOptional: true ), @@ -318,17 +318,17 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "metatype", children: [ Child( - name: "BaseType", + name: "baseType", kind: .node(kind: .type), nameForDiagnostics: "base type" ), Child( - name: "Period", + name: "period", kind: .token(choices: [.token(.period)]) ), Child( - name: "MetatypeSpecifier", - deprecatedName: "TypeOrProtocol", + name: "metatypeSpecifier", + deprecatedName: "typeOrProtocol", kind: .token(choices: [.keyword(text: "Type"), .keyword(text: "Protocol")]) ), ] @@ -341,14 +341,14 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "named opaque return type", children: [ Child( - name: "GenericParameterClause", - deprecatedName: "GenericParameters", + name: "genericParameterClause", + deprecatedName: "genericParameters", kind: .node(kind: .genericParameterClause), documentation: "The parameter clause that defines the generic parameters." ), Child( - name: "Type", - deprecatedName: "BaseType", + name: "type", + deprecatedName: "baseType", kind: .node(kind: .type) ), ] @@ -361,11 +361,11 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "optional type", children: [ Child( - name: "WrappedType", + name: "wrappedType", kind: .node(kind: .type) ), Child( - name: "QuestionMark", + name: "questionMark", kind: .token(choices: [.token(.postfixQuestionMark)]) ), ] @@ -378,12 +378,12 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "suppressed type conformance", children: [ Child( - name: "WithoutTilde", + name: "withoutTilde", kind: .token(choices: [.token(.prefixOperator)]) ), Child( - name: "Type", - deprecatedName: "PatternType", + name: "type", + deprecatedName: "patternType", kind: .node(kind: .type) ), ] @@ -396,12 +396,12 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "variadic expansion", children: [ Child( - name: "RepeatKeyword", + name: "repeatKeyword", kind: .token(choices: [.keyword(text: "repeat")]) ), Child( - name: "RepetitionPattern", - deprecatedName: "PatternType", + name: "repetitionPattern", + deprecatedName: "patternType", kind: .node(kind: .type) ), ] @@ -414,12 +414,12 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "pack element", children: [ Child( - name: "EachKeyword", + name: "eachKeyword", kind: .token(choices: [.keyword(text: "each")]) ), Child( - name: "Pack", - deprecatedName: "PackType", + name: "pack", + deprecatedName: "packType", kind: .node(kind: .type) ), ] @@ -432,7 +432,7 @@ public let TYPE_NODES: [Node] = [ nameForDiagnostics: "type", children: [ Child( - name: "Name", + name: "name", kind: .token(choices: [ .token(.identifier), .keyword(text: "self"), @@ -442,7 +442,7 @@ public let TYPE_NODES: [Node] = [ ]) ), Child( - name: "GenericArgumentClause", + name: "genericArgumentClause", kind: .node(kind: .genericArgumentClause), isOptional: true ), @@ -467,40 +467,40 @@ public let TYPE_NODES: [Node] = [ ], children: [ Child( - name: "InoutKeyword", - deprecatedName: "InOut", + name: "inoutKeyword", + deprecatedName: "inOut", kind: .token(choices: [.keyword(text: "inout")]), isOptional: true ), Child( - name: "FirstName", - deprecatedName: "Name", + name: "firstName", + deprecatedName: "name", kind: .token(choices: [.token(.identifier), .token(.wildcard)]), nameForDiagnostics: "name", isOptional: true ), Child( - name: "SecondName", + name: "secondName", kind: .token(choices: [.token(.identifier), .token(.wildcard)]), nameForDiagnostics: "internal name", isOptional: true ), Child( - name: "Colon", + name: "colon", kind: .token(choices: [.token(.colon)]), isOptional: true ), Child( - name: "Type", + name: "type", kind: .node(kind: .type) ), Child( - name: "Ellipsis", + name: "ellipsis", kind: .token(choices: [.token(.ellipsis)]), isOptional: true ), Child( - name: "TrailingComma", + name: "trailingComma", kind: .token(choices: [.token(.comma)]), isOptional: true ), @@ -517,15 +517,15 @@ public let TYPE_NODES: [Node] = [ ], children: [ Child( - name: "LeftParen", + name: "leftParen", kind: .token(choices: [.token(.leftParen)]) ), Child( - name: "Elements", + name: "elements", kind: .collection(kind: .tupleTypeElementList, collectionElementName: "Element") ), Child( - name: "RightParen", + name: "rightParen", kind: .token(choices: [.token(.rightParen)]) ), ] diff --git a/Sources/SwiftSyntax/generated/RenamedChildrenCompatibility.swift b/Sources/SwiftSyntax/generated/RenamedChildrenCompatibility.swift index 8b8ed17ae9b..bb5d1af7b40 100644 --- a/Sources/SwiftSyntax/generated/RenamedChildrenCompatibility.swift +++ b/Sources/SwiftSyntax/generated/RenamedChildrenCompatibility.swift @@ -6913,7 +6913,7 @@ extension SomeOrAnyTypeSyntax { extension SourceFileSyntax { @available(*, deprecated, renamed: "unexpectedBetweenStatementsAndEndOfFileToken") - public var unexpectedBetweenStatementsAndEOFToken: UnexpectedNodesSyntax? { + public var unexpectedBetweenStatementsAndEofToken: UnexpectedNodesSyntax? { get { return unexpectedBetweenStatementsAndEndOfFileToken } @@ -6933,7 +6933,7 @@ extension SourceFileSyntax { } @available(*, deprecated, renamed: "unexpectedAfterEndOfFileToken") - public var unexpectedAfterEOFToken: UnexpectedNodesSyntax? { + public var unexpectedAfterEofToken: UnexpectedNodesSyntax? { get { return unexpectedAfterEndOfFileToken } @@ -6950,9 +6950,9 @@ extension SourceFileSyntax { shebang: TokenSyntax? = nil, _ unexpectedBetweenShebangAndStatements: UnexpectedNodesSyntax? = nil, statements: CodeBlockItemListSyntax, - _ unexpectedBetweenStatementsAndEOFToken: UnexpectedNodesSyntax? = nil, + _ unexpectedBetweenStatementsAndEofToken: UnexpectedNodesSyntax? = nil, eofToken: TokenSyntax = .endOfFileToken(), - _ unexpectedAfterEOFToken: UnexpectedNodesSyntax? = nil, + _ unexpectedAfterEofToken: UnexpectedNodesSyntax? = nil, trailingTrivia: Trivia? = nil ) { @@ -6962,9 +6962,9 @@ extension SourceFileSyntax { shebang: shebang, unexpectedBetweenShebangAndStatements, statements: statements, - unexpectedBetweenStatementsAndEOFToken, + unexpectedBetweenStatementsAndEofToken, endOfFileToken: eofToken, - unexpectedAfterEOFToken, + unexpectedAfterEofToken, trailingTrivia: trailingTrivia ) } diff --git a/Sources/SwiftSyntaxBuilder/generated/RenamedChildrenBuilderCompatibility.swift b/Sources/SwiftSyntaxBuilder/generated/RenamedChildrenBuilderCompatibility.swift index 6877158d714..3bf72501a9c 100644 --- a/Sources/SwiftSyntaxBuilder/generated/RenamedChildrenBuilderCompatibility.swift +++ b/Sources/SwiftSyntaxBuilder/generated/RenamedChildrenBuilderCompatibility.swift @@ -753,9 +753,9 @@ extension SourceFileSyntax { unexpectedBeforeShebang: UnexpectedNodesSyntax? = nil, shebang: TokenSyntax? = nil, unexpectedBetweenShebangAndStatements: UnexpectedNodesSyntax? = nil, - unexpectedBetweenStatementsAndEOFToken: UnexpectedNodesSyntax? = nil, + unexpectedBetweenStatementsAndEofToken: UnexpectedNodesSyntax? = nil, eofToken: TokenSyntax = .endOfFileToken(), - unexpectedAfterEOFToken: UnexpectedNodesSyntax? = nil, + unexpectedAfterEofToken: UnexpectedNodesSyntax? = nil, @CodeBlockItemListBuilder statementsBuilder: () throws -> CodeBlockItemListSyntax, trailingTrivia: Trivia? = nil ) rethrows { @@ -765,9 +765,9 @@ extension SourceFileSyntax { shebang: shebang, unexpectedBetweenShebangAndStatements, statements: statementsBuilder(), - unexpectedBetweenStatementsAndEOFToken, + unexpectedBetweenStatementsAndEofToken, endOfFileToken: eofToken, - unexpectedAfterEOFToken, + unexpectedAfterEofToken, trailingTrivia: trailingTrivia ) }