From f8ed0c4ba678723acf234e729d3ecedc288851fd Mon Sep 17 00:00:00 2001 From: Joey GM Date: Fri, 7 Jul 2023 22:36:37 +0800 Subject: [PATCH] Documentation - Typos & Consistency Fixes --- Changelog.md | 4 +- .../SyntaxSupport/AvailabilityNodes.swift | 2 +- .../Sources/SyntaxSupport/CommonNodes.swift | 2 +- .../Sources/SyntaxSupport/DeclNodes.swift | 4 +- .../Sources/SyntaxSupport/ExprNodes.swift | 4 +- .../Sources/SyntaxSupport/Node.swift | 6 +- .../SyntaxSupport/SyntaxNodeKind.swift | 2 +- .../Sources/Utils/CodeGenerationFormat.swift | 2 +- .../Sources/Utils/SyntaxBuildableChild.swift | 2 +- .../Sources/Utils/SyntaxBuildableType.swift | 2 +- .../LayoutNode+Extensions.swift | 2 +- .../swiftparser/ParserEntryFile.swift | 2 +- .../swiftsyntax/SyntaxAnyVisitorFile.swift | 2 +- .../swiftsyntax/SyntaxNodesFile.swift | 2 +- .../swiftsyntax/SyntaxRewriterFile.swift | 8 +- .../swiftsyntax/SyntaxVisitorFile.swift | 10 +- .../swiftsyntax/TriviaPiecesFile.swift | 2 +- .../BuildableNodesFile.swift | 2 +- ...amedChildrenBuilderCompatibilityFile.swift | 2 +- .../ValidateSyntaxNodes.swift | 2 +- Sources/SwiftBasicFormat/BasicFormat.swift | 4 +- .../Trivia+FormatExtensions.swift | 4 +- .../SwiftCompilerPlugin/CompilerPlugin.swift | 4 +- .../PluginMacroExpansionContext.swift | 6 +- .../OperatorTable+Folding.swift | 2 +- Sources/SwiftParser/Availability.swift | 6 +- Sources/SwiftParser/Declarations.swift | 10 +- Sources/SwiftParser/Expressions.swift | 10 +- .../IncrementalParseTransition.swift | 8 +- Sources/SwiftParser/Lexer/Cursor.swift | 14 +- .../SwiftParser/Lexer/LexemeSequence.swift | 2 +- .../SwiftParser/Lexer/RegexLiteralLexer.swift | 4 +- Sources/SwiftParser/Lookahead.swift | 2 +- .../SwiftParser/LoopProgressCondition.swift | 2 +- Sources/SwiftParser/Parser.swift | 8 +- Sources/SwiftParser/Specifiers.swift | 2 +- Sources/SwiftParser/Statements.swift | 4 +- .../SwiftParser.docc/ParserDesign.md | 8 +- .../SwiftParser.docc/ParserRecovery.md | 4 +- .../SwiftParserCompatibility.swift | 4 +- Sources/SwiftParser/TokenConsumer.swift | 6 +- Sources/SwiftParser/TokenPrecedence.swift | 12 +- Sources/SwiftParser/TokenSpec.swift | 4 +- Sources/SwiftParser/TopLevel.swift | 4 +- Sources/SwiftParser/Types.swift | 2 +- .../SwiftParser/generated/Parser+Entry.swift | 2 +- .../LexerDiagnosticMessages.swift | 4 +- ...ineStringLiteralDiagnosticsGenerator.swift | 10 +- .../ParseDiagnosticsGenerator.swift | 18 +- .../ParserDiagnosticMessages.swift | 14 +- .../MigrateToNewIfLetSyntax.swift | 2 +- .../SwiftRefactor/RefactoringProvider.swift | 2 +- Sources/SwiftSyntax/Assert.swift | 2 +- Sources/SwiftSyntax/BumpPtrAllocator.swift | 2 +- .../Contributing/ChangingSwiftSyntax.md | 2 +- .../Working with SwiftSyntax.md | 2 +- Sources/SwiftSyntax/Raw/RawSyntax.swift | 2 +- .../SwiftSyntax/Raw/RawSyntaxLayoutView.swift | 2 +- Sources/SwiftSyntax/SourceLocation.swift | 6 +- .../SwiftSyntaxCompatibility.swift | 4 +- Sources/SwiftSyntax/SyntaxArena.swift | 10 +- Sources/SwiftSyntax/SyntaxChildren.swift | 8 +- Sources/SwiftSyntax/SyntaxData.swift | 2 +- Sources/SwiftSyntax/SyntaxText.swift | 6 +- Sources/SwiftSyntax/TokenDiagnostic.swift | 2 +- .../generated/SyntaxAnyVisitor.swift | 2 +- .../generated/SyntaxRewriter.swift | 8 +- .../SwiftSyntax/generated/SyntaxVisitor.swift | 564 +++++++++--------- .../SwiftSyntax/generated/TriviaPieces.swift | 2 +- .../syntaxNodes/SyntaxDeclNodes.swift | 8 +- .../syntaxNodes/SyntaxExprNodes.swift | 2 +- .../generated/syntaxNodes/SyntaxNodes.swift | 2 +- .../ConvenienceInitializers.swift | 4 +- .../Documentation.docc/Index.md | 2 +- .../SwiftSyntaxBuilderCompatibility.swift | 4 +- .../SyntaxNodeWithBody.swift | 4 +- .../MacroExpansion.swift | 4 +- .../MacroReplacement.swift | 4 +- .../MacroExpansionContext.swift | 2 +- .../LocationMarkers.swift | 2 +- .../Syntax+Assertions.swift | 2 +- .../VisitorPerformanceTests.swift | 2 +- Tests/SwiftParserTest/DeclarationTests.swift | 2 +- Tests/SwiftParserTest/ExpressionTests.swift | 4 +- .../translated/AsyncTests.swift | 14 +- .../translated/ErrorsTests.swift | 20 +- .../translated/TypeExprTests.swift | 2 +- build-script.py | 2 +- 88 files changed, 482 insertions(+), 482 deletions(-) diff --git a/Changelog.md b/Changelog.md index f13f8d091e7..9f11e19eeb3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -138,8 +138,8 @@ For increased performance, the modelling of the syntax node hierarchy has been s ```swift let identifierExprSyntax: IdentifierExprSyntax = /* ... */ let node = Syntax(identifierExprSyntax) - node.asProtocol(SyntaxProtocol.self) // returns a IdentifierExprSyntax with static type SyntaxProtocol - node.asProtocol(ExprSyntaxProtocol.self) // returns a IdentifierExprSyntax with static type ExprSyntaxProtocol? + node.asProtocol(SyntaxProtocol.self) // returns an IdentifierExprSyntax with static type SyntaxProtocol + node.asProtocol(ExprSyntaxProtocol.self) // returns an IdentifierExprSyntax with static type ExprSyntaxProtocol? ``` diff --git a/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift b/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift index b619a4bfaa7..cd732ac29da 100644 --- a/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift @@ -60,7 +60,7 @@ public let AVAILABILITY_NODES: [Node] = [ kind: .availabilityLabeledArgument, base: .syntax, nameForDiagnostics: "availability argument", - documentation: "A argument to an `@available` attribute that consists of a label and a value, e.g. `message: \"This has been deprecated\"`.", + 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", diff --git a/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift b/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift index a9a61e2d33c..13ddae5d55b 100644 --- a/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift @@ -191,7 +191,7 @@ public let COMMON_NODES: [Node] = [ kind: .missingExpr, base: .expr, nameForDiagnostics: "expression", - documentation: "In case the source code is missing a expression, this node stands in place of the missing expression.", + documentation: "In case the source code is missing an expression, this node stands in place of the missing expression.", children: [ Child( name: "Placeholder", diff --git a/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift b/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift index 21bfcf24d75..cd8c976716d 100644 --- a/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift @@ -1341,7 +1341,7 @@ public let DECL_NODES: [Node] = [ name: "Signature", kind: .node(kind: .functionSignature), nameForDiagnostics: "function signature", - documentation: "The arguments of the initializer. While the function signature allows specifying an return clause, doing so is not semantically valid." + documentation: "The arguments of the initializer. While the function signature allows specifying a return clause, doing so is not semantically valid." ), Child( name: "GenericWhereClause", @@ -1353,7 +1353,7 @@ public let DECL_NODES: [Node] = [ Child( name: "Body", kind: .node(kind: .codeBlock), - documentation: "The initializer’s body. Missing if the initialier is a requirement of a protocol declaration.", + documentation: "The initializer’s body. Missing if the initializer is a requirement of a protocol declaration.", isOptional: true ), ] diff --git a/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift b/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift index db646cc53bd..7dacae47a20 100644 --- a/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift @@ -864,7 +864,7 @@ public let EXPR_NODES: [Node] = [ // else-clause ';'? // // This node represents both an 'if' expression, as well as an 'if' statement - // when wrapped in a ExpressionStmt node. + // when wrapped in an ExpressionStmt node. Node( kind: .ifExpr, base: .expr, @@ -1652,7 +1652,7 @@ public let EXPR_NODES: [Node] = [ // switch-case-list '}' ';'? // // This node represents both a 'switch' expression, as well as a 'switch' - // statement when wrapped in a ExpressionStmt node. + // statement when wrapped in an ExpressionStmt node. Node( kind: .switchExpr, base: .expr, diff --git a/CodeGeneration/Sources/SyntaxSupport/Node.swift b/CodeGeneration/Sources/SyntaxSupport/Node.swift index f3a39fe9888..8a0108e9fc9 100644 --- a/CodeGeneration/Sources/SyntaxSupport/Node.swift +++ b/CodeGeneration/Sources/SyntaxSupport/Node.swift @@ -16,7 +16,7 @@ import SwiftSyntax /// The definition of a syntax node that, when generated, conforms to /// `SyntaxProtocol`. /// -/// There are two fundemantally different kinds of nodes: +/// There are two fundamentally different kinds of nodes: /// - Layout nodes contain a fixed number of children of possibly different, /// but fixed types. /// - Collection nodes contains an arbitrary number of children but all those @@ -253,14 +253,14 @@ public struct CollectionNode { self.node = node } - /// Allow transparent accesss to the properties of the underlying `Node`. + /// Allow transparent access to the properties of the underlying `Node`. public subscript(dynamicMember keyPath: KeyPath) -> T { return node[keyPath: keyPath] } /// The kinds the elements can have. /// - /// This can be more than one in which case each element an have either of + /// This can be more than one in which case each element can have either of /// these kinds. public var elementChoices: [SyntaxNodeKind] { switch node.data { diff --git a/CodeGeneration/Sources/SyntaxSupport/SyntaxNodeKind.swift b/CodeGeneration/Sources/SyntaxSupport/SyntaxNodeKind.swift index 0c1ff3ccdb0..c9b9601a8de 100644 --- a/CodeGeneration/Sources/SyntaxSupport/SyntaxNodeKind.swift +++ b/CodeGeneration/Sources/SyntaxSupport/SyntaxNodeKind.swift @@ -304,7 +304,7 @@ public enum SyntaxNodeKind: String, CaseIterable { case yieldList case yieldStmt - // Nodes that have special handling throught the codebase + // Nodes that have special handling throughout the codebase case syntax case syntaxCollection diff --git a/CodeGeneration/Sources/Utils/CodeGenerationFormat.swift b/CodeGeneration/Sources/Utils/CodeGenerationFormat.swift index 65c4b7cd2a2..3c88314dbcb 100644 --- a/CodeGeneration/Sources/Utils/CodeGenerationFormat.swift +++ b/CodeGeneration/Sources/Utils/CodeGenerationFormat.swift @@ -92,7 +92,7 @@ public class CodeGenerationFormat: BasicFormat { // MARK: - Private private func shouldBeSeparatedByTwoNewlines(node: CodeBlockItemSyntax) -> Bool { - // First item in the ``CodeBlockItemListSyntax`` don't need a newline or identation if the parent is a ``SourceFileSyntax``. + // First item in the ``CodeBlockItemListSyntax`` don't need a newline or indentation if the parent is a ``SourceFileSyntax``. // We want to group imports so newline between them should be omitted return node.parent?.as(CodeBlockItemListSyntax.self)?.first == node || node.item.is(ImportDeclSyntax.self) } diff --git a/CodeGeneration/Sources/Utils/SyntaxBuildableChild.swift b/CodeGeneration/Sources/Utils/SyntaxBuildableChild.swift index bea041a11d6..ea0c7a9c5e5 100644 --- a/CodeGeneration/Sources/Utils/SyntaxBuildableChild.swift +++ b/CodeGeneration/Sources/Utils/SyntaxBuildableChild.swift @@ -111,7 +111,7 @@ public extension Child { let choicesTexts: [String] if tokenCanContainArbitraryText { - // Don't generate an precondition statement if token can contain arbitrary text. + // Don't generate a precondition statement if token can contain arbitrary text. return nil } else if !choices.isEmpty { choicesTexts = choices.compactMap { diff --git a/CodeGeneration/Sources/Utils/SyntaxBuildableType.swift b/CodeGeneration/Sources/Utils/SyntaxBuildableType.swift index b4d93f06e10..b2f56778042 100644 --- a/CodeGeneration/Sources/Utils/SyntaxBuildableType.swift +++ b/CodeGeneration/Sources/Utils/SyntaxBuildableType.swift @@ -140,7 +140,7 @@ public struct SyntaxBuildableType: Hashable { return optionalWrapped(type: SimpleTypeIdentifierSyntax(name: .identifier(syntaxBaseName))) } - /// The type that is used for paramters in SwiftSyntaxBuilder that take this + /// The type that is used for parameters in SwiftSyntaxBuilder that take this /// type of syntax node. public var parameterBaseType: String { if isBaseType { diff --git a/CodeGeneration/Sources/generate-swiftsyntax/LayoutNode+Extensions.swift b/CodeGeneration/Sources/generate-swiftsyntax/LayoutNode+Extensions.swift index 3d4ab199941..cafefd2a05e 100644 --- a/CodeGeneration/Sources/generate-swiftsyntax/LayoutNode+Extensions.swift +++ b/CodeGeneration/Sources/generate-swiftsyntax/LayoutNode+Extensions.swift @@ -101,7 +101,7 @@ extension LayoutNode { } /// Create a builder-based convenience initializer, if needed. - func createConvenienceBuilerInitializer(useDeprecatedChildName: Bool = false) throws -> InitializerDeclSyntax? { + func createConvenienceBuilderInitializer(useDeprecatedChildName: Bool = false) throws -> InitializerDeclSyntax? { // Only create the convenience initializer if at least one parameter // is different than in the default initializer generated above. var shouldCreateInitializer = false diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/ParserEntryFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/ParserEntryFile.swift index 42d1f64c2e5..b62f2496e61 100644 --- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/ParserEntryFile.swift +++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftparser/ParserEntryFile.swift @@ -112,7 +112,7 @@ let parserEntryFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { """ mutating func parseNonOptionalCodeBlockItem() -> RawCodeBlockItemSyntax { guard let node = self.parseCodeBlockItem(isAtTopLevel: false, allowInitDecl: true) else { - // The missing item is not neccessary to be a declaration, + // The missing item is not necessary to be a declaration, // which is just a placeholder here return RawCodeBlockItemSyntax( item: .decl(RawDeclSyntax(RawMissingDeclSyntax(attributes: nil, modifiers: nil, arena: self.arena))), diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxAnyVisitorFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxAnyVisitorFile.swift index 8be0f3862f0..34cb73122c9 100644 --- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxAnyVisitorFile.swift +++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxAnyVisitorFile.swift @@ -52,7 +52,7 @@ let syntaxAnyVisitorFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ - /// The function called after visiting the node and its descendents. + /// The function called after visiting the node and its descendants. /// - node: the node we just finished visiting. open func visitAnyPost(_ node: Syntax) {} """ diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodesFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodesFile.swift index e46d5a0f5e7..323a4c61959 100644 --- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodesFile.swift +++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodesFile.swift @@ -28,7 +28,7 @@ extension Child { } /// This file generates the syntax nodes for SwiftSyntax. To keep the generated -/// files at a managable file size, it is to be invoked multiple times with the +/// files at a manageable file size, it is to be invoked multiple times with the /// variable `emitKind` set to a base kind listed in /// It then only emits those syntax nodes whose base kind are that specified kind. func syntaxNode(emitKind: SyntaxNodeKind) -> SourceFileSyntax { diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxRewriterFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxRewriterFile.swift index 31a2465fe2d..dfe1102fef5 100644 --- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxRewriterFile.swift +++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxRewriterFile.swift @@ -69,7 +69,7 @@ let syntaxRewriterFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ - /// The function called before visiting the node and its descendents. + /// The function called before visiting the node and its descendants. /// - node: the node we are about to visit. open func visitPre(_ node: Syntax) {} """ @@ -92,7 +92,7 @@ let syntaxRewriterFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ - /// The function called after visiting the node and its descendents. + /// The function called after visiting the node and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: Syntax) {} """ @@ -220,7 +220,7 @@ let syntaxRewriterFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { /// To circumvent this problem, make calling the specific visitation function /// a two-step process: First determine the function to call in this function /// and return a reference to it, then call it. This way, the stack frame - /// that determines the correct visitiation function will be popped of the + /// that determines the correct visitation function will be popped of the /// stack before the function is being called, making the switch's stack /// space transient instead of having it linger in the call stack. private func visitationFunc(for data: SyntaxData) -> ((SyntaxData) -> Syntax) @@ -281,7 +281,7 @@ let syntaxRewriterFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { // rewritten nodes until the first non-`nil` value is encountered. When this // happens, retrieve all previous syntax nodes from the parent node to // initialize the new layout. Once we know that we have to rewrite the - // layout, we need to collect all futher children, regardless of whether + // layout, we need to collect all further children, regardless of whether // they are rewritten or not. // newLayout is nil until the first child node is rewritten and rewritten diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift index 2a76ef60e89..3fc60cdb8e4 100644 --- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift +++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift @@ -18,12 +18,12 @@ import Utils let syntaxVisitorFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ - /// The enum describes how the SyntaxVistor should continue after visiting + /// The enum describes how the ``SyntaxVisitor`` should continue after visiting /// the current node. public enum SyntaxVisitorContinueKind { - /// The visitor should visit the descendents of the current node. + /// The visitor should visit the descendants of the current node. case visitChildren - /// The visitor should avoid visiting the descendents of the current node. + /// The visitor should avoid visiting the descendants of the current node. case skipChildren } """ @@ -64,7 +64,7 @@ let syntaxVisitorFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ - /// The function called after visiting ``\(node.kind.syntaxType)`` and its descendents. + /// The function called after visiting ``\(node.kind.syntaxType)`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: \(node.kind.syntaxType)) {} """ @@ -84,7 +84,7 @@ let syntaxVisitorFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ - /// The function called after visiting the node and its descendents. + /// The function called after visiting the node and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TokenSyntax) {} """ diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TriviaPiecesFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TriviaPiecesFile.swift index f88565ba9d0..d5976d68d02 100644 --- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TriviaPiecesFile.swift +++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TriviaPiecesFile.swift @@ -174,7 +174,7 @@ let triviaPiecesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { /// Trivia piece for token RawSyntax. /// /// In contrast to ``TriviaPiece``, a ``RawTriviaPiece`` does not own the source - /// text of a the trivia. + /// text of the trivia. @_spi(RawSyntax) public enum RawTriviaPiece: Equatable """ diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableNodesFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableNodesFile.swift index 1994bb92c64..9756b2365bb 100644 --- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableNodesFile.swift +++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/BuildableNodesFile.swift @@ -21,7 +21,7 @@ let buildableNodesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { for node in SYNTAX_NODES.compactMap(\.layoutNode) { let type = node.type - if let convenienceInit = try! node.createConvenienceBuilerInitializer() { + if let convenienceInit = try! node.createConvenienceBuilderInitializer() { DeclSyntax( """ extension \(raw: type.syntaxBaseName) { diff --git a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/RenamedChildrenBuilderCompatibilityFile.swift b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/RenamedChildrenBuilderCompatibilityFile.swift index b4333b81558..6c0c46c087a 100644 --- a/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/RenamedChildrenBuilderCompatibilityFile.swift +++ b/CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntaxbuilder/RenamedChildrenBuilderCompatibilityFile.swift @@ -19,7 +19,7 @@ let renamedChildrenBuilderCompatibilityFile = try! SourceFileSyntax(leadingTrivi DeclSyntax("import SwiftSyntax") for layoutNode in SYNTAX_NODES.compactMap(\.layoutNode).filter({ $0.children.hasDeprecatedChild }) { - if let convenienceInit = try layoutNode.createConvenienceBuilerInitializer(useDeprecatedChildName: true) { + if let convenienceInit = try layoutNode.createConvenienceBuilderInitializer(useDeprecatedChildName: true) { let deprecatedNames = layoutNode.children .filter { !$0.isUnexpectedNodes } .compactMap { $0.deprecatedName?.withFirstCharacterLowercased } diff --git a/CodeGeneration/Tests/ValidateSyntaxNodes/ValidateSyntaxNodes.swift b/CodeGeneration/Tests/ValidateSyntaxNodes/ValidateSyntaxNodes.swift index b19e0114864..fb8d0da938f 100644 --- a/CodeGeneration/Tests/ValidateSyntaxNodes/ValidateSyntaxNodes.swift +++ b/CodeGeneration/Tests/ValidateSyntaxNodes/ValidateSyntaxNodes.swift @@ -158,7 +158,7 @@ class ValidateSyntaxNodes: XCTestCase { /// Checks standardized naming of children with a single token choice /// /// - If a child has a single keyword as its choice, it should be named `*Keyword` (e.g. `ImportKeyword`) - /// - If it’s another token kind, name it the same as the the token choice (e.g. `LeftParen`) + /// - If it’s another token kind, name it the same as the token choice (e.g. `LeftParen`) func testSingleTokenChoiceChildNaming() { var failures: [ValidationFailure] = [] for node in SYNTAX_NODES.compactMap(\.layoutNode) { diff --git a/Sources/SwiftBasicFormat/BasicFormat.swift b/Sources/SwiftBasicFormat/BasicFormat.swift index 090218d75ff..0a297cf9417 100644 --- a/Sources/SwiftBasicFormat/BasicFormat.swift +++ b/Sources/SwiftBasicFormat/BasicFormat.swift @@ -24,8 +24,8 @@ open class BasicFormat: SyntaxRewriter { /// How much indentation should be added at a new indentation level. public let indentationWidth: Trivia - /// As we reach a new indendation level, its indentation will be added to the - /// stack. As we exit that indentation level, the indendation will be popped. + /// As we reach a new indentation level, its indentation will be added to the + /// stack. As we exit that indentation level, the indentation will be popped. /// `isUserDefined` is `true` if the indentation was inferred from something /// the user provided manually instead of being inferred from the nesting /// level. diff --git a/Sources/SwiftBasicFormat/Trivia+FormatExtensions.swift b/Sources/SwiftBasicFormat/Trivia+FormatExtensions.swift index 40806430033..12bbbc2024c 100644 --- a/Sources/SwiftBasicFormat/Trivia+FormatExtensions.swift +++ b/Sources/SwiftBasicFormat/Trivia+FormatExtensions.swift @@ -37,10 +37,10 @@ extension Trivia { /// Returns `true` if this trivia contains indentation. func containsIndentation(isOnNewline: Bool) -> Bool { - guard let indentaton = indentation(isOnNewline: isOnNewline) else { + guard let indentation = indentation(isOnNewline: isOnNewline) else { return false } - return !indentaton.isEmpty + return !indentation.isEmpty } /// Returns the indentation of the last trivia piece in this trivia that is diff --git a/Sources/SwiftCompilerPlugin/CompilerPlugin.swift b/Sources/SwiftCompilerPlugin/CompilerPlugin.swift index 53b25610f7d..37fa376f15a 100644 --- a/Sources/SwiftCompilerPlugin/CompilerPlugin.swift +++ b/Sources/SwiftCompilerPlugin/CompilerPlugin.swift @@ -25,7 +25,7 @@ import SwiftSyntaxMacros // A plugin receives messages from the "plugin host" (typically // 'swift-frontend'), and sends back messages in return based on its actions. // -// Depending on the platform, plugins are invoked in a sanbox that blocks +// Depending on the platform, plugins are invoked in a sandbox that blocks // network access and prevents any file system changes. // // The host process and the plugin communicate using messages in the form of @@ -36,7 +36,7 @@ import SwiftSyntaxMacros // // Within the plugin process, `stdout` is redirected to `stderr` so that print // statements from the plugin are treated as plain-text output, and `stdin` is -// closed so that any attemps by the plugin logic to read from console result +// closed so that any attempts by the plugin logic to read from console result // in errors instead of blocking the process. The original `stdin` and `stdout` // are duplicated for use as messaging pipes, and are not directly used by the // plugin logic. diff --git a/Sources/SwiftCompilerPluginMessageHandling/PluginMacroExpansionContext.swift b/Sources/SwiftCompilerPluginMessageHandling/PluginMacroExpansionContext.swift index e6e76b52fb3..ee61d2d27f7 100644 --- a/Sources/SwiftCompilerPluginMessageHandling/PluginMacroExpansionContext.swift +++ b/Sources/SwiftCompilerPluginMessageHandling/PluginMacroExpansionContext.swift @@ -104,7 +104,7 @@ class SourceManager { } /// Get position (file name + UTF-8 offset) of `node` in the known root nodes. - /// The root node of `node` must be one of the retured value from `add(_:)`. + /// The root node of `node` must be one of the returned value from `add(_:)`. func position( of node: Syntax, at kind: PositionInSyntaxNode @@ -121,7 +121,7 @@ class SourceManager { } /// Get ``SourceRange`` (file name + UTF-8 offset range) of `node` in the known root nodes. - /// The root node of `node` must be one of the retured value from `add(_:)`. + /// The root node of `node` must be one of the returned value from `add(_:)`. func range( of node: Syntax, from startKind: PositionInSyntaxNode = .afterLeadingTrivia, @@ -144,7 +144,7 @@ class SourceManager { } /// Get location of `node` in the known root nodes. - /// The root node of `node` must be one of the retured value from `add(_:)`. + /// The root node of `node` must be one of the returned value from `add(_:)`. func location(of node: Syntax, at kind: PositionInSyntaxNode, filePathMode: SourceLocationFilePathMode) -> SourceLocation? { guard let base = self.knownSourceSyntax[node.root.id] else { return nil diff --git a/Sources/SwiftOperators/OperatorTable+Folding.swift b/Sources/SwiftOperators/OperatorTable+Folding.swift index 7c84a224812..4d8b706cfe5 100644 --- a/Sources/SwiftOperators/OperatorTable+Folding.swift +++ b/Sources/SwiftOperators/OperatorTable+Folding.swift @@ -462,7 +462,7 @@ extension OperatorTable { /// Syntax rewriter that folds all of the sequence expressions it /// encounters. private class SequenceFolder: SyntaxRewriter { - /// The first operator precedecence that caused the error handler to + /// The first operator precedence that caused the error handler to /// also throw. var firstFatalError: OperatorError? = nil diff --git a/Sources/SwiftParser/Availability.swift b/Sources/SwiftParser/Availability.swift index 85e9b84b137..3c99ba8ec41 100644 --- a/Sources/SwiftParser/Availability.swift +++ b/Sources/SwiftParser/Availability.swift @@ -23,7 +23,7 @@ extension Parser { var elements = [RawAvailabilityArgumentSyntax]() do { var keepGoing: RawTokenSyntax? = nil - var availablityArgumentProgress = LoopProgressCondition() + var availabilityArgumentProgress = LoopProgressCondition() repeat { let entry: RawAvailabilityArgumentSyntax.Entry if self.at(.identifier) { @@ -48,7 +48,7 @@ extension Parser { arena: self.arena ) ) - } while keepGoing != nil && availablityArgumentProgress.evaluate(currentToken) + } while keepGoing != nil && availabilityArgumentProgress.evaluate(currentToken) } return RawAvailabilitySpecListSyntax(elements: elements, arena: self.arena) @@ -260,7 +260,7 @@ extension Parser { /// /// version-tuple -> integer-literal version-list? /// version-list -> version-tuple-element version-list? - /// version-tuple-element -> '.' interger-literal + /// version-tuple-element -> '.' integer-literal mutating func parseVersionTuple(maxComponentCount: Int) -> RawVersionTupleSyntax { if self.at(.floatingLiteral), let periodIndex = self.currentToken.tokenText.firstIndex(of: UInt8(ascii: ".")), diff --git a/Sources/SwiftParser/Declarations.swift b/Sources/SwiftParser/Declarations.swift index 42e2799d9c4..346e88094c5 100644 --- a/Sources/SwiftParser/Declarations.swift +++ b/Sources/SwiftParser/Declarations.swift @@ -134,12 +134,12 @@ extension TokenConsumer { return true } - // Otherwise, parse it as a expression. + // Otherwise, parse it as an expression. // FIXME: C++ parser returns true if this is a top-level non-"script" files. // But we don't have "is library" flag. return false case .some(_): - // All other decl start keywords unconditonally start a decl. + // All other decl start keywords unconditionally start a decl. return true case nil: if subparser.at(anyIn: ContextualDeclKeyword.self)?.0 != nil { @@ -192,7 +192,7 @@ extension Parser { /// declarations → declaration declarations? /// /// If `inMemberDeclList` is `true`, we know that the next item must be a - /// declaration and thus start with a keyword. This allows futher recovery. + /// declaration and thus start with a keyword. This allows further recovery. mutating func parseDeclaration(inMemberDeclList: Bool = false) -> RawDeclSyntax { // If we are at a `#if` of attributes, the `#if` directive should be // parsed when we're parsing the attributes. @@ -230,7 +230,7 @@ extension Parser { ) // If we are inside a memberDecl list, we don't want to eat closing braces (which most likely close the outer context) - // while recoverying to the declaration start. + // while recovering to the declaration start. let recoveryPrecedence = inMemberDeclList ? TokenPrecedence.closingBrace : nil switch self.canRecoverTo(anyIn: DeclarationKeyword.self, overrideRecoveryPrecedence: recoveryPrecedence) { @@ -2048,7 +2048,7 @@ extension Parser { ) } - /// Parse a macro expansion as an declaration. + /// Parse a macro expansion as a declaration. /// /// /// Grammar diff --git a/Sources/SwiftParser/Expressions.swift b/Sources/SwiftParser/Expressions.swift index 592a5865239..c9eb8db505a 100644 --- a/Sources/SwiftParser/Expressions.swift +++ b/Sources/SwiftParser/Expressions.swift @@ -194,7 +194,7 @@ extension Parser { precondition( elements.count.isMultiple(of: 2), - "elements must have a even number of elements" + "elements must have an even number of elements" ) elements.append(lastElement) @@ -234,7 +234,7 @@ extension Parser { /// Parse an expression sequence operators. /// /// Returns `nil` if the current token is not at an operator. - /// Returns a tuple of an operator expression and a optional right operand + /// Returns a tuple of an operator expression and an optional right operand /// expression. The right operand is only returned if it is not a common /// sequence element. /// @@ -393,7 +393,7 @@ extension Parser { forDirective: Bool = false, pattern: PatternContext = .none ) -> RawExprSyntax { - // Try to parse '@' sign or 'inout' as a attributed typerepr. + // Try to parse '@' sign or 'inout' as an attributed typerepr. if self.at(.atSign, .keyword(.inout)) { var backtrack = self.lookahead() if backtrack.canParseType() { @@ -662,7 +662,7 @@ extension Parser { name = selfKeyword declNameArgs = nil } else { - // Handle an arbitrary declararion name. + // Handle an arbitrary declaration name. (name, declNameArgs) = self.parseDeclNameRef([.keywords, .compoundNames]) } @@ -1040,7 +1040,7 @@ extension Parser { // make sure the . is there, but parsing the ? in \.? as .? doesn't make // sense. This is all made more complicated by .?. being considered an // operator token. Since keypath allows '.!' '.?' and '.[', consume '.' - // the token is a operator starts with '.', or the following token is '['. + // the token is an operator starts with '.', or the following token is '['. let rootType: RawTypeSyntax? if !self.currentToken.starts(with: ".") { rootType = self.parseSimpleType(stopAtFirstPeriod: true) diff --git a/Sources/SwiftParser/IncrementalParseTransition.swift b/Sources/SwiftParser/IncrementalParseTransition.swift index 155f4b991a7..e1f403d34f0 100644 --- a/Sources/SwiftParser/IncrementalParseTransition.swift +++ b/Sources/SwiftParser/IncrementalParseTransition.swift @@ -341,7 +341,7 @@ public struct ConcurrentEdits { var concurrentEdits: [IncrementalEdit] = [] for editToAdd in edits { var editToAdd = editToAdd - var editIndiciesMergedWithNewEdit: [Int] = [] + var editIndicesMergedWithNewEdit: [Int] = [] for (index, existingEdit) in concurrentEdits.enumerated() { if existingEdit.replacementRange.intersectsOrTouches(editToAdd.range) { let intersectionLength = @@ -351,7 +351,7 @@ public struct ConcurrentEdits { length: existingEdit.length + editToAdd.length - intersectionLength, replacementLength: existingEdit.replacementLength + editToAdd.replacementLength - intersectionLength ) - editIndiciesMergedWithNewEdit.append(index) + editIndicesMergedWithNewEdit.append(index) } else if existingEdit.offset < editToAdd.endOffset { editToAdd = IncrementalEdit( offset: editToAdd.offset - existingEdit.replacementLength + existingEdit.length, @@ -360,8 +360,8 @@ public struct ConcurrentEdits { ) } } - precondition(editIndiciesMergedWithNewEdit.isSorted) - for indexToRemove in editIndiciesMergedWithNewEdit.reversed() { + precondition(editIndicesMergedWithNewEdit.isSorted) + for indexToRemove in editIndicesMergedWithNewEdit.reversed() { concurrentEdits.remove(at: indexToRemove) } let insertPos = diff --git a/Sources/SwiftParser/Lexer/Cursor.swift b/Sources/SwiftParser/Lexer/Cursor.swift index 56345310ed0..6365c9035bb 100644 --- a/Sources/SwiftParser/Lexer/Cursor.swift +++ b/Sources/SwiftParser/Lexer/Cursor.swift @@ -313,7 +313,7 @@ extension Lexer { /// diagnostic occurred. let error: Cursor.LexingDiagnostic? let stateTransition: StateTransition? - /// If set, overritdes the trailing trivia lexing mode of the current state + /// If set, overrides the trailing trivia lexing mode of the current state /// for this lexeme. let trailingTriviaLexingMode: Lexer.Cursor.TriviaLexingMode? @@ -685,7 +685,7 @@ extension Lexer.Cursor { } } - /// Advance the cursor while `predicate` is satsified. + /// Advance the cursor while `predicate` is satisfied. mutating func advance(while predicate: (Unicode.Scalar) -> Bool) { while self.advance(if: predicate) {} } @@ -697,7 +697,7 @@ extension Lexer.Cursor { } } - /// Returns `true` if the comment spaned multiple lines and `false` otherwise. + /// Returns `true` if the comment spanned multiple lines and `false` otherwise. /// Assumes that the curser is currently pointing at the `*` of the opening `/*`. mutating func advanceToEndOfSlashStarComment(slashPosition: Lexer.Cursor) -> TriviaResult { precondition(self.previous == UInt8(ascii: "/")) @@ -765,7 +765,7 @@ extension Lexer.Cursor { /// Assumes that the lexer is currently pointing at the character after the first `"`. /// In other words, the `"` is expected to already be consumed. /// - /// `openingRawStringDelimiters` are the number of `#` that are preceeding the `"`. + /// `openingRawStringDelimiters` are the number of `#` that are preceding the `"`. /// This is used to disambiguate e.g. `#"""#` as a single-line string literal. /// If we are looking for the closing `"""` of a string literal, this is `nil`. mutating func advanceIfMultilineStringDelimiter( @@ -1285,7 +1285,7 @@ extension Lexer.Cursor { // 0o[0-7][0-7_]* let zeroConsumed = self.advance(matching: "0") // Consume '0' - let oConsumed = self.advance(matching: "o") // Consome 'o' + let oConsumed = self.advance(matching: "o") // Consume 'o' precondition(zeroConsumed && oConsumed) if let peeked = self.peek(), peeked < UInt8(ascii: "0") || peeked > UInt8(ascii: "7") { let errorPos = self @@ -1604,7 +1604,7 @@ extension Lexer.Cursor { } /// Lexes a single character in a string literal, handling escape sequences - /// like `\n` or `\u{1234}` as a a single character. + /// like `\n` or `\u{1234}` as a single character. mutating func lexCharacterInStringLiteral(stringLiteralKind: StringLiteralKind, delimiterLength: Int) -> CharacterLex { switch self.peek() { case UInt8(ascii: #"""#): @@ -2303,7 +2303,7 @@ extension Lexer.Cursor { case lexemeContents(Lexer.Result) } - /// Assuming the cursor is positioned at neighter a valid identifier nor a + /// Assuming the cursor is positioned at neither a valid identifier nor a /// valid operator start, advance the cursor by what can be considered a /// lexeme. mutating func lexUnknown() -> UnknownCharactersClassification { diff --git a/Sources/SwiftParser/Lexer/LexemeSequence.swift b/Sources/SwiftParser/Lexer/LexemeSequence.swift index 18b74568c3a..308d66300e5 100644 --- a/Sources/SwiftParser/Lexer/LexemeSequence.swift +++ b/Sources/SwiftParser/Lexer/LexemeSequence.swift @@ -28,7 +28,7 @@ extension Lexer { /// The states will be freed when the lexer is finished, i.e. when this /// ``LexemeSequence`` is deallocated. /// - /// The memory footpring of not freeing past lexer states is neglible. It's + /// The memory footprint of not freeing past lexer states is negligible. It's /// usually less than 0.1% of the memory allocated by the syntax arena. var lexerStateAllocator = BumpPtrAllocator(slabSize: 256) diff --git a/Sources/SwiftParser/Lexer/RegexLiteralLexer.swift b/Sources/SwiftParser/Lexer/RegexLiteralLexer.swift index 5a3775ece20..09293bc6541 100644 --- a/Sources/SwiftParser/Lexer/RegexLiteralLexer.swift +++ b/Sources/SwiftParser/Lexer/RegexLiteralLexer.swift @@ -147,7 +147,7 @@ fileprivate struct RegexLiteralLexer { return .continue } - /// Attempt to eat a the closing delimiter. + /// Attempt to eat the closing delimiter. private mutating func tryEatEnding() -> LexResult? { let openPoundCount = builder.numOpenPounds let slashBegin = cursor @@ -617,7 +617,7 @@ extension Lexer.Cursor { case .semicolon, .comma, .colon, .infixQuestionMark: return true - // Postfix grammar would expect an binary operator next. + // Postfix grammar would expect a binary operator next. case .postfixOperator, .exclamationMark, .postfixQuestionMark, .rightAngle, .rightBrace, .rightParen, .rightSquare: return false diff --git a/Sources/SwiftParser/Lookahead.swift b/Sources/SwiftParser/Lookahead.swift index b29e4c08688..22199ee91a7 100644 --- a/Sources/SwiftParser/Lookahead.swift +++ b/Sources/SwiftParser/Lookahead.swift @@ -349,7 +349,7 @@ extension Parser.Lookahead { case skipUntil(_ t1: TokenSpec, _ t2: TokenSpec) } - /// A non-recursie function to skip tokens. + /// A non-recursive function to skip tokens. private mutating func skip(initialState: SkippingState) { var stack: [SkippingState] = [initialState] diff --git a/Sources/SwiftParser/LoopProgressCondition.swift b/Sources/SwiftParser/LoopProgressCondition.swift index a3de3f19416..5a89000eceb 100644 --- a/Sources/SwiftParser/LoopProgressCondition.swift +++ b/Sources/SwiftParser/LoopProgressCondition.swift @@ -22,7 +22,7 @@ struct LoopProgressCondition { /// Check that the loop has made progress since `evaluate` was called the last time. /// `currentToken` is the current token of the parser. /// In assert builds, this traps if the loop has not made any parser progress in between two iterations, - /// ie. it checks if the the parser's `currentToken` has changed in between two calls to `evaluate`. + /// ie. it checks if the parser's `currentToken` has changed in between two calls to `evaluate`. /// In non-assert builds, `evaluate()` returns `false` if the loop has not made progress, thus aborting the loop. mutating func evaluate(_ currentToken: Lexer.Lexeme) -> Bool { defer { diff --git a/Sources/SwiftParser/Parser.swift b/Sources/SwiftParser/Parser.swift index c8e0e8896dd..b8d5801e3bb 100644 --- a/Sources/SwiftParser/Parser.swift +++ b/Sources/SwiftParser/Parser.swift @@ -59,7 +59,7 @@ /// // Parse an element /// let element = self.parseElement() /// -/// // Consume the delimeter +/// // Consume the delimiter /// keepGoing = self.consume(if: .delimiter) /// elements.append(RawElementSyntax(element, ..., keepGoing)) /// } while keepGoing != nil @@ -102,7 +102,7 @@ public struct Parser { let maximumNestingLevel: Int /// A default maximum nesting level that is used if the client didn't - /// explicitly specify one. Debug builds of the parser comume a lot more stack + /// explicitly specify one. Debug builds of the parser consume a lot more stack /// space and thus have a lower default maximum nesting level. #if DEBUG static let defaultMaximumNestingLevel = 25 @@ -315,7 +315,7 @@ extension Parser { extension Parser { /// If the current token matches the given `spec`, consume it. - /// Othwerise, synthesize a missing token of with the `kind` of `spec`. + /// Otherwise, synthesize a missing token of with the `kind` of `spec`. /// /// This method does not try to eat unexpected until it finds the token that /// matches `spec`. @@ -603,7 +603,7 @@ extension Parser { /// - `.`: if no newlines, return both an /// unexpected period (with the extraneous whitespace) and a missing /// period. If there is a newline also set `skipMember` to inform - /// callers to not parse any futher member names. + /// callers to not parse any further member names. mutating func consumeMemberPeriod( previousNode: (some RawSyntaxNodeProtocol)? ) -> (unexpected: RawUnexpectedNodesSyntax?, period: RawTokenSyntax, skipMemberName: Bool) { diff --git a/Sources/SwiftParser/Specifiers.swift b/Sources/SwiftParser/Specifiers.swift index 1600ef2ea0e..eeedb2c9402 100644 --- a/Sources/SwiftParser/Specifiers.swift +++ b/Sources/SwiftParser/Specifiers.swift @@ -710,7 +710,7 @@ extension Parser { /// Consume any misplaced effect specifiers and return them in as unexpected tokens. /// When a misplaced effect specifier is consumed and `effectSpecifiers` - /// doesn't have an effect specifier of that kind, modify `effectSpecifiers` + /// doesn't have an effect specifier of that kind, modify `effectSpecifiers` /// to have a missing specifier of that kind. mutating func parseMisplacedEffectSpecifiers(_ effectSpecifiers: inout S?) -> RawUnexpectedNodesSyntax? { var synthesizedAsync: RawTokenSyntax? = nil diff --git a/Sources/SwiftParser/Statements.swift b/Sources/SwiftParser/Statements.swift index 4e2bfd77250..95f56b2a12b 100644 --- a/Sources/SwiftParser/Statements.swift +++ b/Sources/SwiftParser/Statements.swift @@ -945,7 +945,7 @@ extension Parser.Lookahead { /// - Seealso: ``Parser/parseStatement()`` mutating func isStartOfStatement(allowRecovery: Bool = false) -> Bool { if (self.at(anyIn: SwitchCaseStart.self) != nil || self.at(.atSign)) && withLookahead({ $0.atStartOfSwitchCaseItem() }) { - // We consider SwitchCaseItems statements so we don't parse the start of a new case item as trailing parts of an expresion. + // We consider SwitchCaseItems statements so we don't parse the start of a new case item as trailing parts of an expression. return true } @@ -1037,7 +1037,7 @@ extension Parser.Lookahead { if hasAttribute && lookahead.at(.rightBrace) { // If we are at an attribute that's the last token in the SwitchCase, parse - // that as an attribut to a missing 'case'. That way, if the developer writes + // that as an attribute to a missing 'case'. That way, if the developer writes // @unknown at the end of a switch but forgot to write 'default', we'll emit // a diagnostic about a missing label instead of a missing declaration after // the attribute. diff --git a/Sources/SwiftParser/SwiftParser.docc/ParserDesign.md b/Sources/SwiftParser/SwiftParser.docc/ParserDesign.md index eb1d51bad50..80fbe653963 100644 --- a/Sources/SwiftParser/SwiftParser.docc/ParserDesign.md +++ b/Sources/SwiftParser/SwiftParser.docc/ParserDesign.md @@ -104,7 +104,7 @@ For more information on parser recovery and resilience, see ## Parsing with Minimal Context -The parser takes another unusal stance in its construction: it is mostly +The parser takes another unusual stance in its construction: it is mostly stateless. It is not a hard and fast rule that the parse be stateless, but engineering it with that mindset has enabled a relatively clean, testable parser design to emerge. Swift is not a context-free language, so there will @@ -145,7 +145,7 @@ clear a set of stale diagnostics. The SwiftParser library aims to replace the C++ parser that currently resides in the [Swift compiler][Swiftc]. As such, minimizing the latency involved in -parsing is an extremely important goal. We aim to be competetive with the +parsing is an extremely important goal. We aim to be competitive with the performance of the C++ implementation of the Swift parser _without compromising safety_. @@ -156,12 +156,12 @@ exploring or hacking on this codebase. ### Types are Cheap -The Swift programming langauge provides a rich feature set in its types +The Swift programming language provides a rich feature set in its types including enums with associated values, robust generics, and language facilities for lifting raw bits and bytes into proper APIs. Prefer to make domain-specific types rather than using e.g. `Bool` and `String`. Domain-specific types can help an author maintain a safety contract with the rest of the parser and its -clients that is far stronger than the underyling value type would otherwise +clients that is far stronger than the underlying value type would otherwise provide. Importantly, custom types also provide an excellent opportunity to shape the way that a particular idea or concept is conveyed to users and developers of this library. diff --git a/Sources/SwiftParser/SwiftParser.docc/ParserRecovery.md b/Sources/SwiftParser/SwiftParser.docc/ParserRecovery.md index f5808847d8f..6e579fd115b 100644 --- a/Sources/SwiftParser/SwiftParser.docc/ParserRecovery.md +++ b/Sources/SwiftParser/SwiftParser.docc/ParserRecovery.md @@ -14,7 +14,7 @@ input stream as possible. The Swift parser tries to represent as much structure in the input stream as possible. To that end, the parser tries to recover by looking through the minimum amount of tokens. This optimizes for clients like formatters and editors -that often recieve malformed, partial, and unstructured inputs and must produce +that often receive malformed, partial, and unstructured inputs and must produce sensible outputs in response. The Swift parser differs from many other language parsers by intentionally @@ -34,7 +34,7 @@ with these diagnostics. When the parser expects a token but can’t find it, it looks ahead to see if it can find the expected token by using a token precedence model. Tokens are divided in precedence groups (see `TokenPrecedence`), -dependening on how strongly they mark the structure of the source code. For +depending on how strongly they mark the structure of the source code. For example, keywords that start a declaration, like `func`, have a higher precedence than expression keywords, like `self`. diff --git a/Sources/SwiftParser/SwiftParserCompatibility.swift b/Sources/SwiftParser/SwiftParserCompatibility.swift index d32a79dd8f1..24c966d245e 100644 --- a/Sources/SwiftParser/SwiftParserCompatibility.swift +++ b/Sources/SwiftParser/SwiftParserCompatibility.swift @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -// This file provides compatiblity aliases to keep dependents of SwiftSyntax building. +// This file provides compatibility aliases to keep dependents of SwiftSyntax building. // All users of the declarations in this file should transition away from them ASAP. public extension TokenSpec { @@ -26,6 +26,6 @@ public extension TokenSpec { } //==========================================================================// -// IMPORTANT: If you are tempted to add a compatiblity layer code here // +// IMPORTANT: If you are tempted to add a compatibility layer code here // // please insert it in alphabetical order above // //==========================================================================// diff --git a/Sources/SwiftParser/TokenConsumer.swift b/Sources/SwiftParser/TokenConsumer.swift index e9032e7bbac..d111d6942fd 100644 --- a/Sources/SwiftParser/TokenConsumer.swift +++ b/Sources/SwiftParser/TokenConsumer.swift @@ -62,7 +62,7 @@ struct TokenConsumptionHandle { } extension TokenConsumer { - /// Returns whether the the current token matches `spec` + /// Returns whether the current token matches `spec` @inline(__always) mutating func at(_ spec: TokenSpec) -> Bool { #if SWIFTPARSER_ENABLE_ALTERNATE_TOKEN_INTROSPECTION @@ -73,7 +73,7 @@ extension TokenConsumer { return spec ~= self.currentToken } - /// Returns whether the the current token matches one of the two specs. + /// Returns whether the current token matches one of the two specs. @inline(__always) mutating func at( _ spec1: TokenSpec, @@ -91,7 +91,7 @@ extension TokenConsumer { } } - /// Returns whether the the current token matches one of the three specs. + /// Returns whether the current token matches one of the three specs. @inline(__always) mutating func at( _ spec1: TokenSpec, diff --git a/Sources/SwiftParser/TokenPrecedence.swift b/Sources/SwiftParser/TokenPrecedence.swift index d6c5a526c7f..2e6bf25e1a0 100644 --- a/Sources/SwiftParser/TokenPrecedence.swift +++ b/Sources/SwiftParser/TokenPrecedence.swift @@ -22,7 +22,7 @@ enum TokenPrecedence: Comparable { case identifierLike /// Keywords and operators that can occur in the middle of an expression case exprKeyword - /// A token that starts a bracketet expression which typically occurs inside + /// A token that starts a bracketed expression which typically occurs inside /// a statement. case weakBracketed(closingDelimiter: RawTokenKind) /// A punctuator that can occur inside a statement @@ -45,7 +45,7 @@ enum TokenPrecedence: Comparable { case openingPoundIf case closingPoundIf - /// If the precedence is `weakBracketed` or `strongBracketed`, the closing delimeter of the bracketed group. + /// If the precedence is `weakBracketed` or `strongBracketed`, the closing delimiter of the bracketed group. var closingTokenKind: RawTokenKind? { switch self { case .weakBracketed(closingDelimiter: let closingDelimiter): @@ -97,7 +97,7 @@ enum TokenPrecedence: Comparable { return precedence(lhs) < precedence(rhs) } - /// When expecting a token with `stmtKeyword` precedence or highter, newlines may be skipped to find that token. + /// When expecting a token with `stmtKeyword` precedence or higher, newlines may be skipped to find that token. /// For lower precedence groups, we consider newlines the end of the lookahead scope. var shouldSkipOverNewlines: Bool { return self >= .stmtKeyword @@ -134,7 +134,7 @@ enum TokenPrecedence: Comparable { // Consider 'any' and 'inout' like a prefix operator to a type and a type is expression-like. self = .exprKeyword - // MARK: Weak bracketet + // MARK: Weak bracketed case .leftParen: self = .weakBracketed(closingDelimiter: .rightParen) case .leftSquare: @@ -158,7 +158,7 @@ enum TokenPrecedence: Comparable { .rightAngle, .rightParen, .rightSquare: self = .weakBracketClose - // MARK: Strong bracketet + // MARK: Strong bracketed case .leftBrace: self = .openingBrace(closingDelimiter: .rightBrace) case .poundElseifKeyword, .poundElseKeyword, .poundIfKeyword: @@ -169,7 +169,7 @@ enum TokenPrecedence: Comparable { .semicolon, // Arrow is a strong indicator in a function type that we are now in the return type .arrow, - // EOF is here because it is a very stong marker and doesn't belong anywhere else + // EOF is here because it is a very strong marker and doesn't belong anywhere else .eof: self = .strongPunctuator diff --git a/Sources/SwiftParser/TokenSpec.swift b/Sources/SwiftParser/TokenSpec.swift index 695c24df42e..f5eb361107b 100644 --- a/Sources/SwiftParser/TokenSpec.swift +++ b/Sources/SwiftParser/TokenSpec.swift @@ -66,7 +66,7 @@ public struct TokenSpec { fileprivate let remapping: RawTokenKind? /// The recovery precedence that should be used when consuming this token. By - /// default this is the token precendece of `rawTokenKind` but it can be + /// default this is the token precedence of `rawTokenKind` but it can be /// overridden. let recoveryPrecedence: TokenPrecedence @@ -195,7 +195,7 @@ extension TokenConsumer { } /// Asserts that the current token matches `spec` and consumes it, performing - /// any necessary token kind remappings. + /// any necessary token kind remapping. /// /// This should only be called from parsing primitives like `consume(if:)` and /// `eat`. Introduce new users of this very sparingly. diff --git a/Sources/SwiftParser/TopLevel.swift b/Sources/SwiftParser/TopLevel.swift index c295d4e23f2..f8bf4a9feac 100644 --- a/Sources/SwiftParser/TopLevel.swift +++ b/Sources/SwiftParser/TopLevel.swift @@ -36,7 +36,7 @@ extension Parser { /// Parse the top level items in a file into a source file. /// - /// This function is the true parsing entrypoint that the high-level + /// This function is the true parsing entry point that the high-level /// ``Parser/parse(source:parseTransition:filenameForDiagnostics:languageVersion:enableBareSlashRegexLiteral:)-7tndx`` /// API calls. /// @@ -225,7 +225,7 @@ extension Parser { /// the top level of the source file. If this is the case, we allow skipping /// closing braces while trying to recover to the next item. /// If we are not at the top level, such a closing brace should close the - /// wrapping declaration instead of being consumed by lookeahead. + /// wrapping declaration instead of being consumed by lookahead. private mutating func parseItem(isAtTopLevel: Bool = false, allowInitDecl: Bool = true) -> RawCodeBlockItemSyntax.Item { if self.at(.poundIfKeyword) && !self.withLookahead({ $0.consumeIfConfigOfAttributes() }) { // If config of attributes is parsed as part of declaration parsing as it diff --git a/Sources/SwiftParser/Types.swift b/Sources/SwiftParser/Types.swift index 39408335b8a..13907829d0d 100644 --- a/Sources/SwiftParser/Types.swift +++ b/Sources/SwiftParser/Types.swift @@ -1030,7 +1030,7 @@ extension Parser { ) } else if self.at(.colon) { var lookahead = self.lookahead() - // We only want to continue with a dictionary if we can parse a colon and a simpletype. + // We only want to continue with a dictionary if we can parse a colon and a simple type. // Otherwise we can get a wrong diagnostic if we get a Python-style function declaration. guard lookahead.consume(if: .colon) != nil && lookahead.canParseSimpleType(), let colon = self.consume(if: TokenSpec(.colon, allowAtStartOfLine: false)) diff --git a/Sources/SwiftParser/generated/Parser+Entry.swift b/Sources/SwiftParser/generated/Parser+Entry.swift index a446e1e570d..03441e7cfd4 100644 --- a/Sources/SwiftParser/generated/Parser+Entry.swift +++ b/Sources/SwiftParser/generated/Parser+Entry.swift @@ -355,7 +355,7 @@ fileprivate extension Parser { mutating func parseNonOptionalCodeBlockItem() -> RawCodeBlockItemSyntax { guard let node = self.parseCodeBlockItem(isAtTopLevel: false, allowInitDecl: true) else { - // The missing item is not neccessary to be a declaration, + // The missing item is not necessary to be a declaration, // which is just a placeholder here return RawCodeBlockItemSyntax( item: .decl(RawDeclSyntax(RawMissingDeclSyntax(attributes: nil, modifiers: nil, arena: self.arena))), diff --git a/Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift b/Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift index 35da8cb1445..331ef89254d 100644 --- a/Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift +++ b/Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift @@ -16,7 +16,7 @@ import SwiftDiagnostics fileprivate let diagnosticDomain: String = "SwiftLexer" -/// A error diagnostic whose ID is determined by the diagnostic's type. +/// An error diagnostic whose ID is determined by the diagnostic's type. public protocol TokenError: DiagnosticMessage { var diagnosticID: MessageID { get } } @@ -52,7 +52,7 @@ public enum StaticTokenError: String, DiagnosticMessage { case invalidNumberOfHexDigitsInUnicodeEscape = #"\u{...} escape sequence expects between 1 and 8 hex digits"# case invalidUtf8 = "invalid UTF-8 found in source file" case tokenDiagnosticOffsetOverflow = - "the lexer dicovered an error in this token but was not able to represent its offset due to overflow; please split the token" + "the lexer discovered an error in this token but was not able to represent its offset due to overflow; please split the token" case sourceConflictMarker = "source control conflict marker in source file" case unexpectedBlockCommentEnd = "unexpected end of block comment" case unicodeCurlyQuote = #"unicode curly quote found; use '"' instead"# diff --git a/Sources/SwiftParserDiagnostics/MultiLineStringLiteralDiagnosticsGenerator.swift b/Sources/SwiftParserDiagnostics/MultiLineStringLiteralDiagnosticsGenerator.swift index 2739d2aad3d..de7b978e4cb 100644 --- a/Sources/SwiftParserDiagnostics/MultiLineStringLiteralDiagnosticsGenerator.swift +++ b/Sources/SwiftParserDiagnostics/MultiLineStringLiteralDiagnosticsGenerator.swift @@ -13,7 +13,7 @@ import SwiftDiagnostics @_spi(RawSyntax) import SwiftSyntax -/// A diagnostic that `MultiLineStringLiteralIndentatinDiagnosticsGenerator` is building. +/// A diagnostic that `MultiLineStringLiteralIndentationDiagnosticsGenerator` is building. /// As indentation errors are found on more lines, this diagnostic is modified /// to include more fixIts. private struct InProgressDiagnostic { @@ -25,18 +25,18 @@ private struct InProgressDiagnostic { var handledNodes: [SyntaxIdentifier] } -final class MultiLineStringLiteralIndentatinDiagnosticsGenerator: SyntaxVisitor { +final class MultiLineStringLiteralIndentationDiagnosticsGenerator: SyntaxVisitor { // MARK: Entry public static func diagnose(_ node: StringLiteralExprSyntax) -> [(diagnostic: Diagnostic, handledNodes: [SyntaxIdentifier])] { - let visitor = MultiLineStringLiteralIndentatinDiagnosticsGenerator(closeQuote: node.closeQuote) + let visitor = MultiLineStringLiteralIndentationDiagnosticsGenerator(closeQuote: node.closeQuote) visitor.walk(node) visitor.finishInProgressDiagnostic() return visitor.finishedDiagnostics } - // MARK: Implemenatation + // MARK: Implementation private let closeQuote: TokenSyntax @@ -52,7 +52,7 @@ final class MultiLineStringLiteralIndentatinDiagnosticsGenerator: SyntaxVisitor } private func addIncorrectlyIndentedToken(token: TokenSyntax) { - // Determine kind and position of the diagnonstic + // Determine kind and position of the diagnostic var kind: InvalidIndentationInMultiLineStringLiteralError.Kind = .insufficientIndentation var position = token.positionAfterSkippingLeadingTrivia diff --git a/Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift b/Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift index e41df780f42..e97226405e0 100644 --- a/Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift +++ b/Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift @@ -354,7 +354,7 @@ public class ParseDiagnosticsGenerator: SyntaxAnyVisitor { { // If the next token is missing, the problem here isn’t actually the // space after token but that the missing token should be added after - // `token` without a space. Generate a diagnsotic for that. + // `token` without a space. Generate a diagnostic for that. _ = handleMissingSyntax( nextToken, overridePosition: unexpected.endPositionBeforeTrailingTrivia, @@ -948,7 +948,7 @@ public class ParseDiagnosticsGenerator: SyntaxAnyVisitor { if let unexpectedCondition = node.body.unexpectedBeforeLeftBrace, unexpectedCondition.presentTokens(withKind: .semicolon).count == 2 { - // FIXME: This is aweful. We should have a way to either get all children between two cursors in a syntax node or highlight a range from one node to another. + // FIXME: This is awful. We should have a way to either get all children between two cursors in a syntax node or highlight a range from one node to another. addDiagnostic( node, .cStyleForLoop, @@ -1075,18 +1075,18 @@ public class ParseDiagnosticsGenerator: SyntaxAnyVisitor { // Diagnose !#available(...) and !#unavailable(...) let negatedAvailabilityKeyword = availability.availabilityKeyword.negatedAvailabilityKeyword - let negatedCoditionElement = ConditionElementSyntax( + let negatedConditionElement = ConditionElementSyntax( condition: .availability(availability.with(\.availabilityKeyword, negatedAvailabilityKeyword)), trailingComma: conditionElement.trailingComma ) addDiagnostic( unexpected, - NegatedAvailabilityCondition(avaialabilityCondition: availability, negatedAvailabilityKeyword: negatedAvailabilityKeyword), + NegatedAvailabilityCondition(availabilityCondition: availability, negatedAvailabilityKeyword: negatedAvailabilityKeyword), fixIts: [ FixIt( message: ReplaceTokensFixIt(replaceTokens: [operatorToken, availability.availabilityKeyword], replacements: [negatedAvailabilityKeyword]), changes: [ - .replace(oldNode: Syntax(conditionElement), newNode: Syntax(negatedCoditionElement)) + .replace(oldNode: Syntax(conditionElement), newNode: Syntax(negatedConditionElement)) ] ) ], @@ -1474,7 +1474,7 @@ public class ParseDiagnosticsGenerator: SyntaxAnyVisitor { return .skipChildren } if let extraneous = node.unexpectedBetweenStatementsAndEndOfFileToken, !extraneous.isEmpty { - addDiagnostic(extraneous, ExtaneousCodeAtTopLevel(extraneousCode: extraneous), handledNodes: [extraneous.id]) + addDiagnostic(extraneous, ExtraneousCodeAtTopLevel(extraneousCode: extraneous), handledNodes: [extraneous.id]) } return .visitChildren } @@ -1540,7 +1540,7 @@ public class ParseDiagnosticsGenerator: SyntaxAnyVisitor { ) } - for (diagnostic, handledNodes) in MultiLineStringLiteralIndentatinDiagnosticsGenerator.diagnose(node) { + for (diagnostic, handledNodes) in MultiLineStringLiteralIndentationDiagnosticsGenerator.diagnose(node) { addDiagnostic(diagnostic, handledNodes: handledNodes) } if case .stringSegment(let segment) = node.segments.last { @@ -1555,7 +1555,7 @@ public class ParseDiagnosticsGenerator: SyntaxAnyVisitor { addDiagnostic( invalidContent, position: invalidContent.endPositionBeforeTrailingTrivia, - .escapedNewlineAtLatlineOfMultiLineStringLiteralNotAllowed, + .escapedNewlineAtLastLineOfMultiLineStringLiteralNotAllowed, fixIts: [fixIt], handledNodes: [segment.id] ) @@ -1614,7 +1614,7 @@ public class ParseDiagnosticsGenerator: SyntaxAnyVisitor { if node.unknownAttr?.isMissingAllTokens != false && node.label.isMissingAllTokens { addDiagnostic( node.statements, - .allStatmentsInSwitchMustBeCoveredByCase, + .allStatementsInSwitchMustBeCoveredByCase, fixIts: [ FixIt(message: InsertTokenFixIt(missingNodes: [Syntax(node.label)]), changes: .makePresent(node.label)) ], diff --git a/Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift b/Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift index 8b000d2757e..df6c5d4e8e5 100644 --- a/Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift +++ b/Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift @@ -16,7 +16,7 @@ import SwiftDiagnostics fileprivate let diagnosticDomain: String = "SwiftParser" -/// A error diagnostic whose ID is determined by the diagnostic's type. +/// An error diagnostic whose ID is determined by the diagnostic's type. public protocol ParserError: DiagnosticMessage { var diagnosticID: MessageID { get } } @@ -87,7 +87,7 @@ public struct StaticParserError: DiagnosticMessage { extension DiagnosticMessage where Self == StaticParserError { /// Please order the diagnostics alphabetically by property name. - public static var allStatmentsInSwitchMustBeCoveredByCase: Self { + public static var allStatementsInSwitchMustBeCoveredByCase: Self { .init("all statements inside a switch must be covered by a 'case' or 'default' label") } public static var associatedTypeCannotUsePack: Self { @@ -135,7 +135,7 @@ extension DiagnosticMessage where Self == StaticParserError { public static var editorPlaceholderInSourceFile: Self { .init("editor placeholder in source file") } - public static var escapedNewlineAtLatlineOfMultiLineStringLiteralNotAllowed: Self { + public static var escapedNewlineAtLastLineOfMultiLineStringLiteralNotAllowed: Self { .init("escaped newline at the last line of a multi-line string literal is not allowed") } public static var expectedColonClass: Self { @@ -307,11 +307,11 @@ public struct EffectsSpecifierAfterArrow: ParserError { public let effectsSpecifiersAfterArrow: [TokenSyntax] public var message: String { - "\(nodesDescription(effectsSpecifiersAfterArrow, format: false)) must preceed '->'" + "\(nodesDescription(effectsSpecifiersAfterArrow, format: false)) must precede '->'" } } -public struct ExtaneousCodeAtTopLevel: ParserError { +public struct ExtraneousCodeAtTopLevel: ParserError { public let extraneousCode: UnexpectedNodesSyntax public var message: String { @@ -433,12 +433,12 @@ public struct MissingExpressionInStatement: ParserError { } public struct NegatedAvailabilityCondition: ParserError { - public let avaialabilityCondition: AvailabilityConditionSyntax + public let availabilityCondition: AvailabilityConditionSyntax public let negatedAvailabilityKeyword: TokenSyntax public var message: String { return - "\(nodesDescription([avaialabilityCondition], format: false)) cannot be used in an expression; did you mean \(nodesDescription([negatedAvailabilityKeyword], format: false))?" + "\(nodesDescription([availabilityCondition], format: false)) cannot be used in an expression; did you mean \(nodesDescription([negatedAvailabilityKeyword], format: false))?" } } diff --git a/Sources/SwiftRefactor/MigrateToNewIfLetSyntax.swift b/Sources/SwiftRefactor/MigrateToNewIfLetSyntax.swift index 02a16940510..1e9f0c59dd9 100644 --- a/Sources/SwiftRefactor/MigrateToNewIfLetSyntax.swift +++ b/Sources/SwiftRefactor/MigrateToNewIfLetSyntax.swift @@ -14,7 +14,7 @@ import SwiftSyntax import SwiftParser /// ``MigrateToNewIfLetSyntax`` will visit each if expression in the Syntax tree, and -/// checks if the there is an if condition which is of the pre Swift 5.7 "if-let-style" +/// checks if there is an if condition which is of the pre Swift 5.7 "if-let-style" /// and rewrites it to the new one. /// /// - Seealso: https://github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md diff --git a/Sources/SwiftRefactor/RefactoringProvider.swift b/Sources/SwiftRefactor/RefactoringProvider.swift index 69225237d9b..533da8c1fa2 100644 --- a/Sources/SwiftRefactor/RefactoringProvider.swift +++ b/Sources/SwiftRefactor/RefactoringProvider.swift @@ -110,7 +110,7 @@ extension SyntaxRefactoringProvider { } } -/// An textual edit to the original source represented by a range and a +/// A textual edit to the original source represented by a range and a /// replacement. public struct SourceEdit: Equatable { /// The half-open range that this edit applies to. diff --git a/Sources/SwiftSyntax/Assert.swift b/Sources/SwiftSyntax/Assert.swift index a7607c65abb..997cbea1cb5 100644 --- a/Sources/SwiftSyntax/Assert.swift +++ b/Sources/SwiftSyntax/Assert.swift @@ -11,7 +11,7 @@ //===----------------------------------------------------------------------===// /// How to choose `assert` vs. `precondition`: -/// - Wherever possible, it is preferrable to emit a diagnostic instead of +/// - Wherever possible, it is preferable to emit a diagnostic instead of /// using `precondition`. This way the parser won't crash if the condition is /// violated. /// - If you think the diagnostic added above should never be emitted, it is diff --git a/Sources/SwiftSyntax/BumpPtrAllocator.swift b/Sources/SwiftSyntax/BumpPtrAllocator.swift index dd237305f51..181552f3dc0 100644 --- a/Sources/SwiftSyntax/BumpPtrAllocator.swift +++ b/Sources/SwiftSyntax/BumpPtrAllocator.swift @@ -176,7 +176,7 @@ public class BumpPtrAllocator { } } -// MARK: Compatibilty Shims +// MARK: Compatibility Shims extension UnsafeMutableRawPointer { /// Obtain the next pointer whose bit pattern is a multiple of alignment. diff --git a/Sources/SwiftSyntax/Documentation.docc/Contributing/ChangingSwiftSyntax.md b/Sources/SwiftSyntax/Documentation.docc/Contributing/ChangingSwiftSyntax.md index 89ab7edfff8..67413b10531 100644 --- a/Sources/SwiftSyntax/Documentation.docc/Contributing/ChangingSwiftSyntax.md +++ b/Sources/SwiftSyntax/Documentation.docc/Contributing/ChangingSwiftSyntax.md @@ -90,7 +90,7 @@ When adding nodes or removing existing nodes, it is often the case that you will need a paired PR to the [Swift Compiler repository][Swiftc] as well. This step currently involves some amount of duplication with the SwiftParser library and is a much more involved process. [The Swift Forums][CompilerDev] are a -great source for guidance on how to extend the C++ compiler to accomodate new +great source for guidance on how to extend the C++ compiler to accommodate new syntax and semantics for the Swift programming language. [LiterateProgramming]: https://en.wikipedia.org/wiki/Literate_programming diff --git a/Sources/SwiftSyntax/Documentation.docc/Working with SwiftSyntax.md b/Sources/SwiftSyntax/Documentation.docc/Working with SwiftSyntax.md index bfcc4c1768e..22ced42363a 100644 --- a/Sources/SwiftSyntax/Documentation.docc/Working with SwiftSyntax.md +++ b/Sources/SwiftSyntax/Documentation.docc/Working with SwiftSyntax.md @@ -35,7 +35,7 @@ syntax trees. Immutability also comes with the benefits of fearless concurrency. It is always safe to manipulate a syntax tree across threads. Two threads mutating the same -tree will recieve two independent copies of their respective modified syntax +tree will receive two independent copies of their respective modified syntax trees that will never interfere with each other. Moreover, modifications to the syntax tree do not involve locks or mutexes. diff --git a/Sources/SwiftSyntax/Raw/RawSyntax.swift b/Sources/SwiftSyntax/Raw/RawSyntax.swift index cf3cb4787ff..0dd92f6433a 100644 --- a/Sources/SwiftSyntax/Raw/RawSyntax.swift +++ b/Sources/SwiftSyntax/Raw/RawSyntax.swift @@ -723,7 +723,7 @@ extension RawSyntax { /// - kind: Syntax kind. This should not be `.token`. /// - layout: Layout buffer of the children. /// - byteLength: Computed total byte length of this node. - /// - descedantCount: Total number of the descendant nodes in `layout`. + /// - descendantCount: Total number of the descendant nodes in `layout`. fileprivate static func layout( kind: SyntaxKind, layout: RawSyntaxBuffer, diff --git a/Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift b/Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift index 0fabf713323..cb619707378 100644 --- a/Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift +++ b/Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift @@ -141,7 +141,7 @@ public struct RawSyntaxLayoutView { if buffer.isEmpty { return } var current = buffer.baseAddress! - // Intialize + // Initialize current.initialize(from: children.baseAddress!, count: range.lowerBound) current = current.advanced(by: range.lowerBound) for elem in elements { diff --git a/Sources/SwiftSyntax/SourceLocation.swift b/Sources/SwiftSyntax/SourceLocation.swift index 1b9fcf56acb..7db18a90666 100644 --- a/Sources/SwiftSyntax/SourceLocation.swift +++ b/Sources/SwiftSyntax/SourceLocation.swift @@ -38,7 +38,7 @@ public struct SourceLocation: Hashable, Codable { /// this is the same as `line`. public let presumedLine: Int - /// The file in which the the location resides when respecting `#sourceLocation` + /// The file in which the location resides when respecting `#sourceLocation` /// directives. /// /// If the location has been adjusted using `#sourceLocation` directives, this @@ -161,7 +161,7 @@ fileprivate struct SourceLocationDirectiveArguments { /// part of the same tree that was used to initialize this class. public final class SourceLocationConverter { private let file: String - /// The source of the file, modelled as data so it can contain invalid UTF-8. + /// The source of the file, modeled as data so it can contain invalid UTF-8. private let source: [UInt8] /// Array of lines and the position at the start of the line. private let lines: [AbsolutePosition] @@ -177,7 +177,7 @@ public final class SourceLocationConverter { /// if spelled as `#sourceLocation()` to reset the source location directive. private var sourceLocationDirectives: [(sourceLine: Int, arguments: SourceLocationDirectiveArguments?)] = [] - /// Create a new ``SourceLocationConverter`` to convert betwen ``AbsolutePosition`` + /// Create a new ``SourceLocationConverter`` to convert between ``AbsolutePosition`` /// and ``SourceLocation`` in a syntax tree. /// /// This converter ignores any malformed `#sourceLocation` directives, e.g. diff --git a/Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift b/Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift index dfff0e2e321..59036e01946 100644 --- a/Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift +++ b/Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -// This file provides compatiblity aliases to keep dependents of SwiftSyntax building. +// This file provides compatibility aliases to keep dependents of SwiftSyntax building. // All users of the declarations in this file should transition away from them ASAP. @available(*, deprecated, renamed: "ImportPathSyntax") @@ -82,6 +82,6 @@ public extension TokenSyntax { } //==========================================================================// -// IMPORTANT: If you are tempted to add a compatiblity layer code here // +// IMPORTANT: If you are tempted to add a compatibility layer code here // // please insert it in alphabetical order above // //==========================================================================// diff --git a/Sources/SwiftSyntax/SyntaxArena.swift b/Sources/SwiftSyntax/SyntaxArena.swift index f295ae384c5..015b562eba4 100644 --- a/Sources/SwiftSyntax/SyntaxArena.swift +++ b/Sources/SwiftSyntax/SyntaxArena.swift @@ -99,12 +99,12 @@ public class SyntaxArena { } /// Allocates a buffer of `RawSyntax?` with the given count, then returns the - /// uninitlialized memory range as a `UnsafeMutableBufferPointer`. + /// uninitialized memory range as a `UnsafeMutableBufferPointer`. func allocateRawSyntaxBuffer(count: Int) -> UnsafeMutableBufferPointer { return allocator.allocate(RawSyntax?.self, count: count) } - /// Allcates a buffer of ``RawTriviaPiece`` with the given count, then returns + /// Allocates a buffer of ``RawTriviaPiece`` with the given count, then returns /// the uninitialized memory range as a `UnsafeMutableBufferPointer`. func allocateRawTriviaPieceBuffer( count: Int @@ -112,14 +112,14 @@ public class SyntaxArena { return allocator.allocate(RawTriviaPiece.self, count: count) } - /// Allcates a buffer of `UInt8` with the given count, then returns the + /// Allocates a buffer of `UInt8` with the given count, then returns the /// uninitialized memory range as a `UnsafeMutableBufferPointer`. func allocateTextBuffer(count: Int) -> UnsafeMutableBufferPointer { return allocator.allocate(UInt8.self, count: count) } /// Copies the contents of a ``SyntaxText`` to the memory this arena manages, - /// and return the ``SyntaxText`` in the destiation. + /// and return the ``SyntaxText`` in the destination. @_spi(RawSyntax) public func intern(_ value: SyntaxText) -> SyntaxText { // Return the passed-in value if it's already managed by this arena. @@ -145,7 +145,7 @@ public class SyntaxArena { } } - /// Copies a `RawSyntaxData` to the memory this arena manages, and retuns the + /// Copies a `RawSyntaxData` to the memory this arena manages, and returns the /// pointer to the destination. func intern(_ value: RawSyntaxData) -> UnsafePointer { let allocated = allocator.allocate(RawSyntaxData.self, count: 1).baseAddress! diff --git a/Sources/SwiftSyntax/SyntaxChildren.swift b/Sources/SwiftSyntax/SyntaxChildren.swift index 23de716d842..1366d276de7 100644 --- a/Sources/SwiftSyntax/SyntaxChildren.swift +++ b/Sources/SwiftSyntax/SyntaxChildren.swift @@ -63,8 +63,8 @@ public struct SyntaxChildrenIndex: Comparable, ExpressibleByNilLiteral { /// `nil` represents the end index and `.some` represents a materialized index /// that points into a collection. - /// It is faster to use `Optional` here rather than making ` - /// SyntaxChildrenIndex` an enumbecause the optional value can be + /// It is faster to use `Optional` here rather than making + /// `SyntaxChildrenIndex` an enum because the optional value can be /// force-unwrapped when we know that an index is not the end index, saving a /// switch case comparison. let data: SyntaxChildrenIndexData? @@ -153,7 +153,7 @@ struct RawSyntaxChildren: BidirectionalCollection { /// The rootId of the tree the child nodes belong to private let rootId: UInt - /// The number of childer in `parent`. Cached to avoid reaching into `parent` for every index + /// The number of children in `parent`. Cached to avoid reaching into `parent` for every index /// advancement // FIXME: Do we need this cached? private let numberOfChildren: Int @@ -392,7 +392,7 @@ struct NonNilRawSyntaxChildren: BidirectionalCollection { subscript(position: SyntaxChildrenIndex) -> AbsoluteRawSyntax { let (node, info) = allChildren[position] - // Valid indicies always point to present nodes. Thus safe to force unwrap. + // Valid indices always point to present nodes. Thus safe to force unwrap. return AbsoluteRawSyntax(raw: node!, info: info) } diff --git a/Sources/SwiftSyntax/SyntaxData.swift b/Sources/SwiftSyntax/SyntaxData.swift index 5455e1e3205..10e9ba27401 100644 --- a/Sources/SwiftSyntax/SyntaxData.swift +++ b/Sources/SwiftSyntax/SyntaxData.swift @@ -276,7 +276,7 @@ struct SyntaxData { /// Creates a ``SyntaxData`` for a root raw node. /// /// - Parameters: - /// - raw: The raw node that will be the root of the the tree + /// - raw: The raw node that will be the root of the tree /// - rawNodeArena: The arena in which `raw` is allocated. It is passed to /// make sure the arena doesn’t get de-allocated before the ``SyntaxData`` /// has a chance to retain it. diff --git a/Sources/SwiftSyntax/SyntaxText.swift b/Sources/SwiftSyntax/SyntaxText.swift index 43b2d463bff..c5613bee381 100644 --- a/Sources/SwiftSyntax/SyntaxText.swift +++ b/Sources/SwiftSyntax/SyntaxText.swift @@ -26,9 +26,9 @@ /// whose lifetime extends past that of the SyntaxText. /// /// ``SyntaxText`` is a `Collection` of `UInt8` which is _expected_ to be a UTF8 -/// encoded byte sequence. However, since that is essentialy just a span of a +/// encoded byte sequence. However, since that is essentially just a span of a /// memory buffer, it may contain ill-formed UTF8 sequences. And their -/// comparision (e.g.`==`, hasPrefix()) are purely based on the byte squences, +/// comparison (e.g.`==`, hasPrefix()) are purely based on the byte sequences, /// without any Unicode normalization or anything. /// /// Since it's just a byte sequence, ``SyntaxText`` can represent the exact source @@ -185,7 +185,7 @@ extension SyntaxText: Hashable { // extremely rare, and checking it causes extra branch. // The most common usage is comparing parsed text with a static text e.g. // `token.text == "func"`. In such cases `compareMemory`(`memcmp`) is - // optimzed to a `cmp` or similar opcode if either operand is a short static + // optimized to a `cmp` or similar opcode if either operand is a short static // text. So the same-baseAddress shortcut doesn't give us a huge performance // boost even if they actually refer the same memory. return compareMemory(lBase, rBase, lhs.count) diff --git a/Sources/SwiftSyntax/TokenDiagnostic.swift b/Sources/SwiftSyntax/TokenDiagnostic.swift index 07ca0dd200e..0a48338c265 100644 --- a/Sources/SwiftSyntax/TokenDiagnostic.swift +++ b/Sources/SwiftSyntax/TokenDiagnostic.swift @@ -48,7 +48,7 @@ public struct TokenDiagnostic: Hashable { case sourceConflictMarker case spaceAtEndOfRegexLiteral case spaceAtStartOfRegexLiteral - /// The lexer dicovered an error but was not able to represent the offset of the error because it would overflow `LexerErrorOffset`. + /// The lexer discovered an error but was not able to represent the offset of the error because it would overflow `LexerErrorOffset`. case tokenDiagnosticOffsetOverflow case unexpectedBlockCommentEnd case unicodeCurlyQuote diff --git a/Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift b/Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift index 6b42cc9734d..cf1052d0ca6 100644 --- a/Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift +++ b/Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift @@ -38,7 +38,7 @@ open class SyntaxAnyVisitor: SyntaxVisitor { return .visitChildren } - /// The function called after visiting the node and its descendents. + /// The function called after visiting the node and its descendants. /// - node: the node we just finished visiting. open func visitAnyPost(_ node: Syntax) { } diff --git a/Sources/SwiftSyntax/generated/SyntaxRewriter.swift b/Sources/SwiftSyntax/generated/SyntaxRewriter.swift index 4fb89cc9f9c..f9ba35449af 100644 --- a/Sources/SwiftSyntax/generated/SyntaxRewriter.swift +++ b/Sources/SwiftSyntax/generated/SyntaxRewriter.swift @@ -47,7 +47,7 @@ open class SyntaxRewriter { return token } - /// The function called before visiting the node and its descendents. + /// The function called before visiting the node and its descendants. /// - node: the node we are about to visit. open func visitPre(_ node: Syntax) { } @@ -63,7 +63,7 @@ open class SyntaxRewriter { return nil } - /// The function called after visiting the node and its descendents. + /// The function called after visiting the node and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: Syntax) { } @@ -5988,7 +5988,7 @@ open class SyntaxRewriter { /// To circumvent this problem, make calling the specific visitation function /// a two-step process: First determine the function to call in this function /// and return a reference to it, then call it. This way, the stack frame - /// that determines the correct visitiation function will be popped of the + /// that determines the correct visitation function will be popped of the /// stack before the function is being called, making the switch's stack /// space transient instead of having it linger in the call stack. private func visitationFunc(for data: SyntaxData) -> ((SyntaxData) -> Syntax) { @@ -7128,7 +7128,7 @@ open class SyntaxRewriter { // rewritten nodes until the first non-`nil` value is encountered. When this // happens, retrieve all previous syntax nodes from the parent node to // initialize the new layout. Once we know that we have to rewrite the - // layout, we need to collect all futher children, regardless of whether + // layout, we need to collect all further children, regardless of whether // they are rewritten or not. // newLayout is nil until the first child node is rewritten and rewritten diff --git a/Sources/SwiftSyntax/generated/SyntaxVisitor.swift b/Sources/SwiftSyntax/generated/SyntaxVisitor.swift index c76d42ee720..dd0d3a35dce 100644 --- a/Sources/SwiftSyntax/generated/SyntaxVisitor.swift +++ b/Sources/SwiftSyntax/generated/SyntaxVisitor.swift @@ -12,12 +12,12 @@ // //===----------------------------------------------------------------------===// -/// The enum describes how the SyntaxVistor should continue after visiting +/// The enum describes how the ``SyntaxVisitor`` should continue after visiting /// the current node. public enum SyntaxVisitorContinueKind { - /// The visitor should visit the descendents of the current node. + /// The visitor should visit the descendants of the current node. case visitChildren - /// The visitor should avoid visiting the descendents of the current node. + /// The visitor should avoid visiting the descendants of the current node. case skipChildren } @@ -41,7 +41,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AccessesEffectSyntax`` and its descendents. + /// The function called after visiting ``AccessesEffectSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AccessesEffectSyntax) { } @@ -53,7 +53,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AccessorBlockSyntax`` and its descendents. + /// The function called after visiting ``AccessorBlockSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AccessorBlockSyntax) { } @@ -65,7 +65,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AccessorDeclSyntax`` and its descendents. + /// The function called after visiting ``AccessorDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AccessorDeclSyntax) { } @@ -77,7 +77,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AccessorEffectSpecifiersSyntax`` and its descendents. + /// The function called after visiting ``AccessorEffectSpecifiersSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AccessorEffectSpecifiersSyntax) { } @@ -89,7 +89,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AccessorInitEffectsSyntax`` and its descendents. + /// The function called after visiting ``AccessorInitEffectsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AccessorInitEffectsSyntax) { } @@ -101,7 +101,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AccessorListSyntax`` and its descendents. + /// The function called after visiting ``AccessorListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AccessorListSyntax) { } @@ -113,7 +113,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AccessorParameterSyntax`` and its descendents. + /// The function called after visiting ``AccessorParameterSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AccessorParameterSyntax) { } @@ -125,7 +125,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ActorDeclSyntax`` and its descendents. + /// The function called after visiting ``ActorDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ActorDeclSyntax) { } @@ -137,7 +137,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ArrayElementListSyntax`` and its descendents. + /// The function called after visiting ``ArrayElementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ArrayElementListSyntax) { } @@ -149,7 +149,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ArrayElementSyntax`` and its descendents. + /// The function called after visiting ``ArrayElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ArrayElementSyntax) { } @@ -161,7 +161,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ArrayExprSyntax`` and its descendents. + /// The function called after visiting ``ArrayExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ArrayExprSyntax) { } @@ -173,7 +173,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ArrayTypeSyntax`` and its descendents. + /// The function called after visiting ``ArrayTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ArrayTypeSyntax) { } @@ -185,7 +185,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ArrowExprSyntax`` and its descendents. + /// The function called after visiting ``ArrowExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ArrowExprSyntax) { } @@ -197,7 +197,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AsExprSyntax`` and its descendents. + /// The function called after visiting ``AsExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AsExprSyntax) { } @@ -209,7 +209,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AssignmentExprSyntax`` and its descendents. + /// The function called after visiting ``AssignmentExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AssignmentExprSyntax) { } @@ -221,7 +221,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AssociatedtypeDeclSyntax`` and its descendents. + /// The function called after visiting ``AssociatedtypeDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AssociatedtypeDeclSyntax) { } @@ -233,7 +233,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AttributeListSyntax`` and its descendents. + /// The function called after visiting ``AttributeListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AttributeListSyntax) { } @@ -245,7 +245,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AttributeSyntax`` and its descendents. + /// The function called after visiting ``AttributeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AttributeSyntax) { } @@ -257,7 +257,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AttributedTypeSyntax`` and its descendents. + /// The function called after visiting ``AttributedTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AttributedTypeSyntax) { } @@ -269,7 +269,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AvailabilityArgumentSyntax`` and its descendents. + /// The function called after visiting ``AvailabilityArgumentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AvailabilityArgumentSyntax) { } @@ -281,7 +281,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AvailabilityConditionSyntax`` and its descendents. + /// The function called after visiting ``AvailabilityConditionSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AvailabilityConditionSyntax) { } @@ -293,7 +293,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AvailabilityEntrySyntax`` and its descendents. + /// The function called after visiting ``AvailabilityEntrySyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AvailabilityEntrySyntax) { } @@ -305,7 +305,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AvailabilityLabeledArgumentSyntax`` and its descendents. + /// The function called after visiting ``AvailabilityLabeledArgumentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AvailabilityLabeledArgumentSyntax) { } @@ -317,7 +317,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AvailabilitySpecListSyntax`` and its descendents. + /// The function called after visiting ``AvailabilitySpecListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AvailabilitySpecListSyntax) { } @@ -329,7 +329,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AvailabilityVersionRestrictionListEntrySyntax`` and its descendents. + /// The function called after visiting ``AvailabilityVersionRestrictionListEntrySyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AvailabilityVersionRestrictionListEntrySyntax) { } @@ -341,7 +341,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AvailabilityVersionRestrictionListSyntax`` and its descendents. + /// The function called after visiting ``AvailabilityVersionRestrictionListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AvailabilityVersionRestrictionListSyntax) { } @@ -353,7 +353,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AvailabilityVersionRestrictionSyntax`` and its descendents. + /// The function called after visiting ``AvailabilityVersionRestrictionSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AvailabilityVersionRestrictionSyntax) { } @@ -365,7 +365,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``AwaitExprSyntax`` and its descendents. + /// The function called after visiting ``AwaitExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: AwaitExprSyntax) { } @@ -377,7 +377,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``BackDeployedAttributeSpecListSyntax`` and its descendents. + /// The function called after visiting ``BackDeployedAttributeSpecListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: BackDeployedAttributeSpecListSyntax) { } @@ -389,7 +389,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``BinaryOperatorExprSyntax`` and its descendents. + /// The function called after visiting ``BinaryOperatorExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: BinaryOperatorExprSyntax) { } @@ -401,7 +401,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``BooleanLiteralExprSyntax`` and its descendents. + /// The function called after visiting ``BooleanLiteralExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: BooleanLiteralExprSyntax) { } @@ -413,7 +413,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``BorrowExprSyntax`` and its descendents. + /// The function called after visiting ``BorrowExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: BorrowExprSyntax) { } @@ -425,7 +425,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``BreakStmtSyntax`` and its descendents. + /// The function called after visiting ``BreakStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: BreakStmtSyntax) { } @@ -437,7 +437,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CanImportExprSyntax`` and its descendents. + /// The function called after visiting ``CanImportExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CanImportExprSyntax) { } @@ -449,7 +449,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CanImportVersionInfoSyntax`` and its descendents. + /// The function called after visiting ``CanImportVersionInfoSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CanImportVersionInfoSyntax) { } @@ -461,7 +461,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CaseItemListSyntax`` and its descendents. + /// The function called after visiting ``CaseItemListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CaseItemListSyntax) { } @@ -473,7 +473,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CaseItemSyntax`` and its descendents. + /// The function called after visiting ``CaseItemSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CaseItemSyntax) { } @@ -485,7 +485,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CatchClauseListSyntax`` and its descendents. + /// The function called after visiting ``CatchClauseListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CatchClauseListSyntax) { } @@ -497,7 +497,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CatchClauseSyntax`` and its descendents. + /// The function called after visiting ``CatchClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CatchClauseSyntax) { } @@ -509,7 +509,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CatchItemListSyntax`` and its descendents. + /// The function called after visiting ``CatchItemListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CatchItemListSyntax) { } @@ -521,7 +521,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CatchItemSyntax`` and its descendents. + /// The function called after visiting ``CatchItemSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CatchItemSyntax) { } @@ -533,7 +533,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClassDeclSyntax`` and its descendents. + /// The function called after visiting ``ClassDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClassDeclSyntax) { } @@ -545,7 +545,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClassRestrictionTypeSyntax`` and its descendents. + /// The function called after visiting ``ClassRestrictionTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClassRestrictionTypeSyntax) { } @@ -557,7 +557,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureCaptureItemListSyntax`` and its descendents. + /// The function called after visiting ``ClosureCaptureItemListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureCaptureItemListSyntax) { } @@ -569,7 +569,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureCaptureItemSpecifierSyntax`` and its descendents. + /// The function called after visiting ``ClosureCaptureItemSpecifierSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureCaptureItemSpecifierSyntax) { } @@ -581,7 +581,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureCaptureItemSyntax`` and its descendents. + /// The function called after visiting ``ClosureCaptureItemSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureCaptureItemSyntax) { } @@ -593,7 +593,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureCaptureSignatureSyntax`` and its descendents. + /// The function called after visiting ``ClosureCaptureSignatureSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureCaptureSignatureSyntax) { } @@ -605,7 +605,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureExprSyntax`` and its descendents. + /// The function called after visiting ``ClosureExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureExprSyntax) { } @@ -617,7 +617,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureParamListSyntax`` and its descendents. + /// The function called after visiting ``ClosureParamListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureParamListSyntax) { } @@ -629,7 +629,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureParamSyntax`` and its descendents. + /// The function called after visiting ``ClosureParamSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureParamSyntax) { } @@ -641,7 +641,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureParameterClauseSyntax`` and its descendents. + /// The function called after visiting ``ClosureParameterClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureParameterClauseSyntax) { } @@ -653,7 +653,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureParameterListSyntax`` and its descendents. + /// The function called after visiting ``ClosureParameterListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureParameterListSyntax) { } @@ -665,7 +665,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureParameterSyntax`` and its descendents. + /// The function called after visiting ``ClosureParameterSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureParameterSyntax) { } @@ -677,7 +677,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ClosureSignatureSyntax`` and its descendents. + /// The function called after visiting ``ClosureSignatureSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ClosureSignatureSyntax) { } @@ -689,7 +689,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CodeBlockItemListSyntax`` and its descendents. + /// The function called after visiting ``CodeBlockItemListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CodeBlockItemListSyntax) { } @@ -701,7 +701,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CodeBlockItemSyntax`` and its descendents. + /// The function called after visiting ``CodeBlockItemSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CodeBlockItemSyntax) { } @@ -713,7 +713,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CodeBlockSyntax`` and its descendents. + /// The function called after visiting ``CodeBlockSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CodeBlockSyntax) { } @@ -725,7 +725,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CompositionTypeElementListSyntax`` and its descendents. + /// The function called after visiting ``CompositionTypeElementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CompositionTypeElementListSyntax) { } @@ -737,7 +737,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CompositionTypeElementSyntax`` and its descendents. + /// The function called after visiting ``CompositionTypeElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CompositionTypeElementSyntax) { } @@ -749,7 +749,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CompositionTypeSyntax`` and its descendents. + /// The function called after visiting ``CompositionTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CompositionTypeSyntax) { } @@ -761,7 +761,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ConditionElementListSyntax`` and its descendents. + /// The function called after visiting ``ConditionElementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ConditionElementListSyntax) { } @@ -773,7 +773,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ConditionElementSyntax`` and its descendents. + /// The function called after visiting ``ConditionElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ConditionElementSyntax) { } @@ -785,7 +785,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ConformanceRequirementSyntax`` and its descendents. + /// The function called after visiting ``ConformanceRequirementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ConformanceRequirementSyntax) { } @@ -797,7 +797,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ConstrainedSugarTypeSyntax`` and its descendents. + /// The function called after visiting ``ConstrainedSugarTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ConstrainedSugarTypeSyntax) { } @@ -809,7 +809,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ContinueStmtSyntax`` and its descendents. + /// The function called after visiting ``ContinueStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ContinueStmtSyntax) { } @@ -821,7 +821,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ConventionAttributeArgumentsSyntax`` and its descendents. + /// The function called after visiting ``ConventionAttributeArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ConventionAttributeArgumentsSyntax) { } @@ -833,7 +833,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ConventionWitnessMethodAttributeArgumentsSyntax`` and its descendents. + /// The function called after visiting ``ConventionWitnessMethodAttributeArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ConventionWitnessMethodAttributeArgumentsSyntax) { } @@ -845,7 +845,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``CopyExprSyntax`` and its descendents. + /// The function called after visiting ``CopyExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: CopyExprSyntax) { } @@ -857,7 +857,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DeclModifierDetailSyntax`` and its descendents. + /// The function called after visiting ``DeclModifierDetailSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DeclModifierDetailSyntax) { } @@ -869,7 +869,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DeclModifierSyntax`` and its descendents. + /// The function called after visiting ``DeclModifierSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DeclModifierSyntax) { } @@ -881,7 +881,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DeclNameArgumentListSyntax`` and its descendents. + /// The function called after visiting ``DeclNameArgumentListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DeclNameArgumentListSyntax) { } @@ -893,7 +893,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DeclNameArgumentSyntax`` and its descendents. + /// The function called after visiting ``DeclNameArgumentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DeclNameArgumentSyntax) { } @@ -905,7 +905,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DeclNameArgumentsSyntax`` and its descendents. + /// The function called after visiting ``DeclNameArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DeclNameArgumentsSyntax) { } @@ -917,7 +917,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DeclNameSyntax`` and its descendents. + /// The function called after visiting ``DeclNameSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DeclNameSyntax) { } @@ -929,7 +929,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DeferStmtSyntax`` and its descendents. + /// The function called after visiting ``DeferStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DeferStmtSyntax) { } @@ -941,7 +941,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DeinitEffectSpecifiersSyntax`` and its descendents. + /// The function called after visiting ``DeinitEffectSpecifiersSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DeinitEffectSpecifiersSyntax) { } @@ -953,7 +953,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DeinitializerDeclSyntax`` and its descendents. + /// The function called after visiting ``DeinitializerDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DeinitializerDeclSyntax) { } @@ -965,7 +965,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DerivativeRegistrationAttributeArgumentsSyntax`` and its descendents. + /// The function called after visiting ``DerivativeRegistrationAttributeArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DerivativeRegistrationAttributeArgumentsSyntax) { } @@ -977,7 +977,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DesignatedTypeElementSyntax`` and its descendents. + /// The function called after visiting ``DesignatedTypeElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DesignatedTypeElementSyntax) { } @@ -989,7 +989,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DesignatedTypeListSyntax`` and its descendents. + /// The function called after visiting ``DesignatedTypeListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DesignatedTypeListSyntax) { } @@ -1001,7 +1001,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DictionaryElementListSyntax`` and its descendents. + /// The function called after visiting ``DictionaryElementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DictionaryElementListSyntax) { } @@ -1013,7 +1013,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DictionaryElementSyntax`` and its descendents. + /// The function called after visiting ``DictionaryElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DictionaryElementSyntax) { } @@ -1025,7 +1025,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DictionaryExprSyntax`` and its descendents. + /// The function called after visiting ``DictionaryExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DictionaryExprSyntax) { } @@ -1037,7 +1037,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DictionaryTypeSyntax`` and its descendents. + /// The function called after visiting ``DictionaryTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DictionaryTypeSyntax) { } @@ -1049,7 +1049,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DifferentiabilityParamListSyntax`` and its descendents. + /// The function called after visiting ``DifferentiabilityParamListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DifferentiabilityParamListSyntax) { } @@ -1061,7 +1061,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DifferentiabilityParamSyntax`` and its descendents. + /// The function called after visiting ``DifferentiabilityParamSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DifferentiabilityParamSyntax) { } @@ -1073,7 +1073,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DifferentiabilityParamsClauseSyntax`` and its descendents. + /// The function called after visiting ``DifferentiabilityParamsClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DifferentiabilityParamsClauseSyntax) { } @@ -1085,7 +1085,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DifferentiabilityParamsSyntax`` and its descendents. + /// The function called after visiting ``DifferentiabilityParamsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DifferentiabilityParamsSyntax) { } @@ -1097,7 +1097,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DifferentiableAttributeArgumentsSyntax`` and its descendents. + /// The function called after visiting ``DifferentiableAttributeArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DifferentiableAttributeArgumentsSyntax) { } @@ -1109,7 +1109,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DiscardAssignmentExprSyntax`` and its descendents. + /// The function called after visiting ``DiscardAssignmentExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DiscardAssignmentExprSyntax) { } @@ -1121,7 +1121,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DiscardStmtSyntax`` and its descendents. + /// The function called after visiting ``DiscardStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DiscardStmtSyntax) { } @@ -1133,7 +1133,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DoStmtSyntax`` and its descendents. + /// The function called after visiting ``DoStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DoStmtSyntax) { } @@ -1145,7 +1145,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DocumentationAttributeArgumentSyntax`` and its descendents. + /// The function called after visiting ``DocumentationAttributeArgumentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DocumentationAttributeArgumentSyntax) { } @@ -1157,7 +1157,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DocumentationAttributeArgumentsSyntax`` and its descendents. + /// The function called after visiting ``DocumentationAttributeArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DocumentationAttributeArgumentsSyntax) { } @@ -1169,7 +1169,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``DynamicReplacementArgumentsSyntax`` and its descendents. + /// The function called after visiting ``DynamicReplacementArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: DynamicReplacementArgumentsSyntax) { } @@ -1181,7 +1181,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EditorPlaceholderDeclSyntax`` and its descendents. + /// The function called after visiting ``EditorPlaceholderDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EditorPlaceholderDeclSyntax) { } @@ -1193,7 +1193,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EditorPlaceholderExprSyntax`` and its descendents. + /// The function called after visiting ``EditorPlaceholderExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EditorPlaceholderExprSyntax) { } @@ -1205,7 +1205,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EffectsArgumentsSyntax`` and its descendents. + /// The function called after visiting ``EffectsArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EffectsArgumentsSyntax) { } @@ -1217,7 +1217,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EnumCaseDeclSyntax`` and its descendents. + /// The function called after visiting ``EnumCaseDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EnumCaseDeclSyntax) { } @@ -1229,7 +1229,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EnumCaseElementListSyntax`` and its descendents. + /// The function called after visiting ``EnumCaseElementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EnumCaseElementListSyntax) { } @@ -1241,7 +1241,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EnumCaseElementSyntax`` and its descendents. + /// The function called after visiting ``EnumCaseElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EnumCaseElementSyntax) { } @@ -1253,7 +1253,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EnumCaseParameterClauseSyntax`` and its descendents. + /// The function called after visiting ``EnumCaseParameterClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EnumCaseParameterClauseSyntax) { } @@ -1265,7 +1265,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EnumCaseParameterListSyntax`` and its descendents. + /// The function called after visiting ``EnumCaseParameterListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EnumCaseParameterListSyntax) { } @@ -1277,7 +1277,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EnumCaseParameterSyntax`` and its descendents. + /// The function called after visiting ``EnumCaseParameterSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EnumCaseParameterSyntax) { } @@ -1289,7 +1289,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``EnumDeclSyntax`` and its descendents. + /// The function called after visiting ``EnumDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: EnumDeclSyntax) { } @@ -1301,7 +1301,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ExposeAttributeArgumentsSyntax`` and its descendents. + /// The function called after visiting ``ExposeAttributeArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ExposeAttributeArgumentsSyntax) { } @@ -1313,7 +1313,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ExprListSyntax`` and its descendents. + /// The function called after visiting ``ExprListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ExprListSyntax) { } @@ -1325,7 +1325,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ExpressionPatternSyntax`` and its descendents. + /// The function called after visiting ``ExpressionPatternSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ExpressionPatternSyntax) { } @@ -1337,7 +1337,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ExpressionSegmentSyntax`` and its descendents. + /// The function called after visiting ``ExpressionSegmentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ExpressionSegmentSyntax) { } @@ -1349,7 +1349,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ExpressionStmtSyntax`` and its descendents. + /// The function called after visiting ``ExpressionStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ExpressionStmtSyntax) { } @@ -1361,7 +1361,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ExtensionDeclSyntax`` and its descendents. + /// The function called after visiting ``ExtensionDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ExtensionDeclSyntax) { } @@ -1373,7 +1373,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``FallthroughStmtSyntax`` and its descendents. + /// The function called after visiting ``FallthroughStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: FallthroughStmtSyntax) { } @@ -1385,7 +1385,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``FloatLiteralExprSyntax`` and its descendents. + /// The function called after visiting ``FloatLiteralExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: FloatLiteralExprSyntax) { } @@ -1397,7 +1397,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ForInStmtSyntax`` and its descendents. + /// The function called after visiting ``ForInStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ForInStmtSyntax) { } @@ -1409,7 +1409,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ForcedValueExprSyntax`` and its descendents. + /// The function called after visiting ``ForcedValueExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ForcedValueExprSyntax) { } @@ -1421,7 +1421,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``FunctionCallExprSyntax`` and its descendents. + /// The function called after visiting ``FunctionCallExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: FunctionCallExprSyntax) { } @@ -1433,7 +1433,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``FunctionDeclSyntax`` and its descendents. + /// The function called after visiting ``FunctionDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: FunctionDeclSyntax) { } @@ -1445,7 +1445,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``FunctionEffectSpecifiersSyntax`` and its descendents. + /// The function called after visiting ``FunctionEffectSpecifiersSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: FunctionEffectSpecifiersSyntax) { } @@ -1457,7 +1457,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``FunctionParameterListSyntax`` and its descendents. + /// The function called after visiting ``FunctionParameterListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: FunctionParameterListSyntax) { } @@ -1469,7 +1469,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``FunctionParameterSyntax`` and its descendents. + /// The function called after visiting ``FunctionParameterSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: FunctionParameterSyntax) { } @@ -1481,7 +1481,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``FunctionSignatureSyntax`` and its descendents. + /// The function called after visiting ``FunctionSignatureSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: FunctionSignatureSyntax) { } @@ -1493,7 +1493,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``FunctionTypeSyntax`` and its descendents. + /// The function called after visiting ``FunctionTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: FunctionTypeSyntax) { } @@ -1505,7 +1505,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GenericArgumentClauseSyntax`` and its descendents. + /// The function called after visiting ``GenericArgumentClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GenericArgumentClauseSyntax) { } @@ -1517,7 +1517,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GenericArgumentListSyntax`` and its descendents. + /// The function called after visiting ``GenericArgumentListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GenericArgumentListSyntax) { } @@ -1529,7 +1529,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GenericArgumentSyntax`` and its descendents. + /// The function called after visiting ``GenericArgumentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GenericArgumentSyntax) { } @@ -1541,7 +1541,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GenericParameterClauseSyntax`` and its descendents. + /// The function called after visiting ``GenericParameterClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GenericParameterClauseSyntax) { } @@ -1553,7 +1553,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GenericParameterListSyntax`` and its descendents. + /// The function called after visiting ``GenericParameterListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GenericParameterListSyntax) { } @@ -1565,7 +1565,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GenericParameterSyntax`` and its descendents. + /// The function called after visiting ``GenericParameterSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GenericParameterSyntax) { } @@ -1577,7 +1577,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GenericRequirementListSyntax`` and its descendents. + /// The function called after visiting ``GenericRequirementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GenericRequirementListSyntax) { } @@ -1589,7 +1589,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GenericRequirementSyntax`` and its descendents. + /// The function called after visiting ``GenericRequirementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GenericRequirementSyntax) { } @@ -1601,7 +1601,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GenericWhereClauseSyntax`` and its descendents. + /// The function called after visiting ``GenericWhereClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GenericWhereClauseSyntax) { } @@ -1613,7 +1613,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``GuardStmtSyntax`` and its descendents. + /// The function called after visiting ``GuardStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: GuardStmtSyntax) { } @@ -1625,7 +1625,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``IdentifierExprSyntax`` and its descendents. + /// The function called after visiting ``IdentifierExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: IdentifierExprSyntax) { } @@ -1637,7 +1637,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``IdentifierPatternSyntax`` and its descendents. + /// The function called after visiting ``IdentifierPatternSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: IdentifierPatternSyntax) { } @@ -1649,7 +1649,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``IfConfigClauseListSyntax`` and its descendents. + /// The function called after visiting ``IfConfigClauseListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: IfConfigClauseListSyntax) { } @@ -1661,7 +1661,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``IfConfigClauseSyntax`` and its descendents. + /// The function called after visiting ``IfConfigClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: IfConfigClauseSyntax) { } @@ -1673,7 +1673,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``IfConfigDeclSyntax`` and its descendents. + /// The function called after visiting ``IfConfigDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: IfConfigDeclSyntax) { } @@ -1685,7 +1685,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``IfExprSyntax`` and its descendents. + /// The function called after visiting ``IfExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: IfExprSyntax) { } @@ -1697,7 +1697,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ImplementsAttributeArgumentsSyntax`` and its descendents. + /// The function called after visiting ``ImplementsAttributeArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ImplementsAttributeArgumentsSyntax) { } @@ -1709,7 +1709,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ImplicitlyUnwrappedOptionalTypeSyntax`` and its descendents. + /// The function called after visiting ``ImplicitlyUnwrappedOptionalTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ImplicitlyUnwrappedOptionalTypeSyntax) { } @@ -1721,7 +1721,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ImportDeclSyntax`` and its descendents. + /// The function called after visiting ``ImportDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ImportDeclSyntax) { } @@ -1733,7 +1733,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ImportPathComponentSyntax`` and its descendents. + /// The function called after visiting ``ImportPathComponentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ImportPathComponentSyntax) { } @@ -1745,7 +1745,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ImportPathSyntax`` and its descendents. + /// The function called after visiting ``ImportPathSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ImportPathSyntax) { } @@ -1757,7 +1757,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``InOutExprSyntax`` and its descendents. + /// The function called after visiting ``InOutExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: InOutExprSyntax) { } @@ -1769,7 +1769,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``InfixOperatorExprSyntax`` and its descendents. + /// The function called after visiting ``InfixOperatorExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: InfixOperatorExprSyntax) { } @@ -1781,7 +1781,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``InheritedTypeListSyntax`` and its descendents. + /// The function called after visiting ``InheritedTypeListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: InheritedTypeListSyntax) { } @@ -1793,7 +1793,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``InheritedTypeSyntax`` and its descendents. + /// The function called after visiting ``InheritedTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: InheritedTypeSyntax) { } @@ -1805,7 +1805,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``InitializerClauseSyntax`` and its descendents. + /// The function called after visiting ``InitializerClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: InitializerClauseSyntax) { } @@ -1817,7 +1817,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``InitializerDeclSyntax`` and its descendents. + /// The function called after visiting ``InitializerDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: InitializerDeclSyntax) { } @@ -1829,7 +1829,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``InitializesEffectSyntax`` and its descendents. + /// The function called after visiting ``InitializesEffectSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: InitializesEffectSyntax) { } @@ -1841,7 +1841,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``IntegerLiteralExprSyntax`` and its descendents. + /// The function called after visiting ``IntegerLiteralExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: IntegerLiteralExprSyntax) { } @@ -1853,7 +1853,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``IsExprSyntax`` and its descendents. + /// The function called after visiting ``IsExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: IsExprSyntax) { } @@ -1865,7 +1865,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``IsTypePatternSyntax`` and its descendents. + /// The function called after visiting ``IsTypePatternSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: IsTypePatternSyntax) { } @@ -1877,7 +1877,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``KeyPathComponentListSyntax`` and its descendents. + /// The function called after visiting ``KeyPathComponentListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: KeyPathComponentListSyntax) { } @@ -1889,7 +1889,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``KeyPathComponentSyntax`` and its descendents. + /// The function called after visiting ``KeyPathComponentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: KeyPathComponentSyntax) { } @@ -1901,7 +1901,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``KeyPathExprSyntax`` and its descendents. + /// The function called after visiting ``KeyPathExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: KeyPathExprSyntax) { } @@ -1913,7 +1913,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``KeyPathOptionalComponentSyntax`` and its descendents. + /// The function called after visiting ``KeyPathOptionalComponentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: KeyPathOptionalComponentSyntax) { } @@ -1925,7 +1925,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``KeyPathPropertyComponentSyntax`` and its descendents. + /// The function called after visiting ``KeyPathPropertyComponentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: KeyPathPropertyComponentSyntax) { } @@ -1937,7 +1937,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``KeyPathSubscriptComponentSyntax`` and its descendents. + /// The function called after visiting ``KeyPathSubscriptComponentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: KeyPathSubscriptComponentSyntax) { } @@ -1949,7 +1949,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``LabeledSpecializeEntrySyntax`` and its descendents. + /// The function called after visiting ``LabeledSpecializeEntrySyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: LabeledSpecializeEntrySyntax) { } @@ -1961,7 +1961,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``LabeledStmtSyntax`` and its descendents. + /// The function called after visiting ``LabeledStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: LabeledStmtSyntax) { } @@ -1973,7 +1973,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``LayoutRequirementSyntax`` and its descendents. + /// The function called after visiting ``LayoutRequirementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: LayoutRequirementSyntax) { } @@ -1985,7 +1985,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MacroDeclSyntax`` and its descendents. + /// The function called after visiting ``MacroDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MacroDeclSyntax) { } @@ -1997,7 +1997,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MacroExpansionDeclSyntax`` and its descendents. + /// The function called after visiting ``MacroExpansionDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MacroExpansionDeclSyntax) { } @@ -2009,7 +2009,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MacroExpansionExprSyntax`` and its descendents. + /// The function called after visiting ``MacroExpansionExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MacroExpansionExprSyntax) { } @@ -2021,7 +2021,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MatchingPatternConditionSyntax`` and its descendents. + /// The function called after visiting ``MatchingPatternConditionSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MatchingPatternConditionSyntax) { } @@ -2033,7 +2033,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MemberAccessExprSyntax`` and its descendents. + /// The function called after visiting ``MemberAccessExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MemberAccessExprSyntax) { } @@ -2045,7 +2045,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MemberDeclBlockSyntax`` and its descendents. + /// The function called after visiting ``MemberDeclBlockSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MemberDeclBlockSyntax) { } @@ -2057,7 +2057,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MemberDeclListItemSyntax`` and its descendents. + /// The function called after visiting ``MemberDeclListItemSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MemberDeclListItemSyntax) { } @@ -2069,7 +2069,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MemberDeclListSyntax`` and its descendents. + /// The function called after visiting ``MemberDeclListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MemberDeclListSyntax) { } @@ -2081,7 +2081,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MemberTypeIdentifierSyntax`` and its descendents. + /// The function called after visiting ``MemberTypeIdentifierSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MemberTypeIdentifierSyntax) { } @@ -2093,7 +2093,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MetatypeTypeSyntax`` and its descendents. + /// The function called after visiting ``MetatypeTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MetatypeTypeSyntax) { } @@ -2105,7 +2105,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MissingDeclSyntax`` and its descendents. + /// The function called after visiting ``MissingDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MissingDeclSyntax) { } @@ -2117,7 +2117,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MissingExprSyntax`` and its descendents. + /// The function called after visiting ``MissingExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MissingExprSyntax) { } @@ -2129,7 +2129,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MissingPatternSyntax`` and its descendents. + /// The function called after visiting ``MissingPatternSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MissingPatternSyntax) { } @@ -2141,7 +2141,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MissingStmtSyntax`` and its descendents. + /// The function called after visiting ``MissingStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MissingStmtSyntax) { } @@ -2153,7 +2153,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MissingSyntax`` and its descendents. + /// The function called after visiting ``MissingSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MissingSyntax) { } @@ -2165,7 +2165,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MissingTypeSyntax`` and its descendents. + /// The function called after visiting ``MissingTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MissingTypeSyntax) { } @@ -2177,7 +2177,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ModifierListSyntax`` and its descendents. + /// The function called after visiting ``ModifierListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ModifierListSyntax) { } @@ -2189,7 +2189,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MoveExprSyntax`` and its descendents. + /// The function called after visiting ``MoveExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MoveExprSyntax) { } @@ -2201,7 +2201,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MultipleTrailingClosureElementListSyntax`` and its descendents. + /// The function called after visiting ``MultipleTrailingClosureElementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MultipleTrailingClosureElementListSyntax) { } @@ -2213,7 +2213,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``MultipleTrailingClosureElementSyntax`` and its descendents. + /// The function called after visiting ``MultipleTrailingClosureElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: MultipleTrailingClosureElementSyntax) { } @@ -2225,7 +2225,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``NamedOpaqueReturnTypeSyntax`` and its descendents. + /// The function called after visiting ``NamedOpaqueReturnTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: NamedOpaqueReturnTypeSyntax) { } @@ -2237,7 +2237,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``NilLiteralExprSyntax`` and its descendents. + /// The function called after visiting ``NilLiteralExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: NilLiteralExprSyntax) { } @@ -2249,7 +2249,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ObjCSelectorPieceSyntax`` and its descendents. + /// The function called after visiting ``ObjCSelectorPieceSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ObjCSelectorPieceSyntax) { } @@ -2261,7 +2261,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ObjCSelectorSyntax`` and its descendents. + /// The function called after visiting ``ObjCSelectorSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ObjCSelectorSyntax) { } @@ -2273,7 +2273,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``OpaqueReturnTypeOfAttributeArgumentsSyntax`` and its descendents. + /// The function called after visiting ``OpaqueReturnTypeOfAttributeArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: OpaqueReturnTypeOfAttributeArgumentsSyntax) { } @@ -2285,7 +2285,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``OperatorDeclSyntax`` and its descendents. + /// The function called after visiting ``OperatorDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: OperatorDeclSyntax) { } @@ -2297,7 +2297,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``OperatorPrecedenceAndTypesSyntax`` and its descendents. + /// The function called after visiting ``OperatorPrecedenceAndTypesSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: OperatorPrecedenceAndTypesSyntax) { } @@ -2309,7 +2309,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``OptionalBindingConditionSyntax`` and its descendents. + /// The function called after visiting ``OptionalBindingConditionSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: OptionalBindingConditionSyntax) { } @@ -2321,7 +2321,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``OptionalChainingExprSyntax`` and its descendents. + /// The function called after visiting ``OptionalChainingExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: OptionalChainingExprSyntax) { } @@ -2333,7 +2333,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``OptionalTypeSyntax`` and its descendents. + /// The function called after visiting ``OptionalTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: OptionalTypeSyntax) { } @@ -2345,7 +2345,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``OriginallyDefinedInArgumentsSyntax`` and its descendents. + /// The function called after visiting ``OriginallyDefinedInArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: OriginallyDefinedInArgumentsSyntax) { } @@ -2357,7 +2357,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PackElementExprSyntax`` and its descendents. + /// The function called after visiting ``PackElementExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PackElementExprSyntax) { } @@ -2369,7 +2369,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PackExpansionExprSyntax`` and its descendents. + /// The function called after visiting ``PackExpansionExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PackExpansionExprSyntax) { } @@ -2381,7 +2381,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PackExpansionTypeSyntax`` and its descendents. + /// The function called after visiting ``PackExpansionTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PackExpansionTypeSyntax) { } @@ -2393,7 +2393,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PackReferenceTypeSyntax`` and its descendents. + /// The function called after visiting ``PackReferenceTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PackReferenceTypeSyntax) { } @@ -2405,7 +2405,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ParameterClauseSyntax`` and its descendents. + /// The function called after visiting ``ParameterClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ParameterClauseSyntax) { } @@ -2417,7 +2417,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PatternBindingListSyntax`` and its descendents. + /// The function called after visiting ``PatternBindingListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PatternBindingListSyntax) { } @@ -2429,7 +2429,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PatternBindingSyntax`` and its descendents. + /// The function called after visiting ``PatternBindingSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PatternBindingSyntax) { } @@ -2441,7 +2441,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PostfixIfConfigExprSyntax`` and its descendents. + /// The function called after visiting ``PostfixIfConfigExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PostfixIfConfigExprSyntax) { } @@ -2453,7 +2453,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PostfixUnaryExprSyntax`` and its descendents. + /// The function called after visiting ``PostfixUnaryExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PostfixUnaryExprSyntax) { } @@ -2465,7 +2465,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PoundSourceLocationArgsSyntax`` and its descendents. + /// The function called after visiting ``PoundSourceLocationArgsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PoundSourceLocationArgsSyntax) { } @@ -2477,7 +2477,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PoundSourceLocationSyntax`` and its descendents. + /// The function called after visiting ``PoundSourceLocationSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PoundSourceLocationSyntax) { } @@ -2489,7 +2489,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrecedenceGroupAssignmentSyntax`` and its descendents. + /// The function called after visiting ``PrecedenceGroupAssignmentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrecedenceGroupAssignmentSyntax) { } @@ -2501,7 +2501,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrecedenceGroupAssociativitySyntax`` and its descendents. + /// The function called after visiting ``PrecedenceGroupAssociativitySyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrecedenceGroupAssociativitySyntax) { } @@ -2513,7 +2513,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrecedenceGroupAttributeListSyntax`` and its descendents. + /// The function called after visiting ``PrecedenceGroupAttributeListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrecedenceGroupAttributeListSyntax) { } @@ -2525,7 +2525,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrecedenceGroupDeclSyntax`` and its descendents. + /// The function called after visiting ``PrecedenceGroupDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrecedenceGroupDeclSyntax) { } @@ -2537,7 +2537,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrecedenceGroupNameElementSyntax`` and its descendents. + /// The function called after visiting ``PrecedenceGroupNameElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrecedenceGroupNameElementSyntax) { } @@ -2549,7 +2549,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrecedenceGroupNameListSyntax`` and its descendents. + /// The function called after visiting ``PrecedenceGroupNameListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrecedenceGroupNameListSyntax) { } @@ -2561,7 +2561,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrecedenceGroupRelationSyntax`` and its descendents. + /// The function called after visiting ``PrecedenceGroupRelationSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrecedenceGroupRelationSyntax) { } @@ -2573,7 +2573,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrefixOperatorExprSyntax`` and its descendents. + /// The function called after visiting ``PrefixOperatorExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrefixOperatorExprSyntax) { } @@ -2585,7 +2585,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrimaryAssociatedTypeClauseSyntax`` and its descendents. + /// The function called after visiting ``PrimaryAssociatedTypeClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrimaryAssociatedTypeClauseSyntax) { } @@ -2597,7 +2597,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrimaryAssociatedTypeListSyntax`` and its descendents. + /// The function called after visiting ``PrimaryAssociatedTypeListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrimaryAssociatedTypeListSyntax) { } @@ -2609,7 +2609,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``PrimaryAssociatedTypeSyntax`` and its descendents. + /// The function called after visiting ``PrimaryAssociatedTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: PrimaryAssociatedTypeSyntax) { } @@ -2621,7 +2621,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ProtocolDeclSyntax`` and its descendents. + /// The function called after visiting ``ProtocolDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ProtocolDeclSyntax) { } @@ -2633,7 +2633,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``QualifiedDeclNameSyntax`` and its descendents. + /// The function called after visiting ``QualifiedDeclNameSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: QualifiedDeclNameSyntax) { } @@ -2645,7 +2645,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``RegexLiteralExprSyntax`` and its descendents. + /// The function called after visiting ``RegexLiteralExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: RegexLiteralExprSyntax) { } @@ -2657,7 +2657,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``RepeatWhileStmtSyntax`` and its descendents. + /// The function called after visiting ``RepeatWhileStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: RepeatWhileStmtSyntax) { } @@ -2669,7 +2669,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ReturnClauseSyntax`` and its descendents. + /// The function called after visiting ``ReturnClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ReturnClauseSyntax) { } @@ -2681,7 +2681,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ReturnStmtSyntax`` and its descendents. + /// The function called after visiting ``ReturnStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ReturnStmtSyntax) { } @@ -2693,7 +2693,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SameTypeRequirementSyntax`` and its descendents. + /// The function called after visiting ``SameTypeRequirementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SameTypeRequirementSyntax) { } @@ -2705,7 +2705,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SequenceExprSyntax`` and its descendents. + /// The function called after visiting ``SequenceExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SequenceExprSyntax) { } @@ -2717,7 +2717,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SimpleTypeIdentifierSyntax`` and its descendents. + /// The function called after visiting ``SimpleTypeIdentifierSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SimpleTypeIdentifierSyntax) { } @@ -2729,7 +2729,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SourceFileSyntax`` and its descendents. + /// The function called after visiting ``SourceFileSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SourceFileSyntax) { } @@ -2741,7 +2741,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SpecializeAttributeSpecListSyntax`` and its descendents. + /// The function called after visiting ``SpecializeAttributeSpecListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SpecializeAttributeSpecListSyntax) { } @@ -2753,7 +2753,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SpecializeExprSyntax`` and its descendents. + /// The function called after visiting ``SpecializeExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SpecializeExprSyntax) { } @@ -2765,7 +2765,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``StringLiteralExprSyntax`` and its descendents. + /// The function called after visiting ``StringLiteralExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: StringLiteralExprSyntax) { } @@ -2777,7 +2777,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``StringLiteralSegmentsSyntax`` and its descendents. + /// The function called after visiting ``StringLiteralSegmentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: StringLiteralSegmentsSyntax) { } @@ -2789,7 +2789,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``StringSegmentSyntax`` and its descendents. + /// The function called after visiting ``StringSegmentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: StringSegmentSyntax) { } @@ -2801,7 +2801,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``StructDeclSyntax`` and its descendents. + /// The function called after visiting ``StructDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: StructDeclSyntax) { } @@ -2813,7 +2813,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SubscriptDeclSyntax`` and its descendents. + /// The function called after visiting ``SubscriptDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SubscriptDeclSyntax) { } @@ -2825,7 +2825,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SubscriptExprSyntax`` and its descendents. + /// The function called after visiting ``SubscriptExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SubscriptExprSyntax) { } @@ -2837,7 +2837,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SuperRefExprSyntax`` and its descendents. + /// The function called after visiting ``SuperRefExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SuperRefExprSyntax) { } @@ -2849,7 +2849,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SuppressedTypeSyntax`` and its descendents. + /// The function called after visiting ``SuppressedTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SuppressedTypeSyntax) { } @@ -2861,7 +2861,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SwitchCaseLabelSyntax`` and its descendents. + /// The function called after visiting ``SwitchCaseLabelSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SwitchCaseLabelSyntax) { } @@ -2873,7 +2873,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SwitchCaseListSyntax`` and its descendents. + /// The function called after visiting ``SwitchCaseListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SwitchCaseListSyntax) { } @@ -2885,7 +2885,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SwitchCaseSyntax`` and its descendents. + /// The function called after visiting ``SwitchCaseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SwitchCaseSyntax) { } @@ -2897,7 +2897,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SwitchDefaultLabelSyntax`` and its descendents. + /// The function called after visiting ``SwitchDefaultLabelSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SwitchDefaultLabelSyntax) { } @@ -2909,7 +2909,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``SwitchExprSyntax`` and its descendents. + /// The function called after visiting ``SwitchExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: SwitchExprSyntax) { } @@ -2921,7 +2921,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TargetFunctionEntrySyntax`` and its descendents. + /// The function called after visiting ``TargetFunctionEntrySyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TargetFunctionEntrySyntax) { } @@ -2933,7 +2933,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TernaryExprSyntax`` and its descendents. + /// The function called after visiting ``TernaryExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TernaryExprSyntax) { } @@ -2945,7 +2945,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ThrowStmtSyntax`` and its descendents. + /// The function called after visiting ``ThrowStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ThrowStmtSyntax) { } @@ -2957,7 +2957,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TryExprSyntax`` and its descendents. + /// The function called after visiting ``TryExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TryExprSyntax) { } @@ -2969,7 +2969,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TupleExprElementListSyntax`` and its descendents. + /// The function called after visiting ``TupleExprElementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TupleExprElementListSyntax) { } @@ -2981,7 +2981,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TupleExprElementSyntax`` and its descendents. + /// The function called after visiting ``TupleExprElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TupleExprElementSyntax) { } @@ -2993,7 +2993,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TupleExprSyntax`` and its descendents. + /// The function called after visiting ``TupleExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TupleExprSyntax) { } @@ -3005,7 +3005,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TuplePatternElementListSyntax`` and its descendents. + /// The function called after visiting ``TuplePatternElementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TuplePatternElementListSyntax) { } @@ -3017,7 +3017,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TuplePatternElementSyntax`` and its descendents. + /// The function called after visiting ``TuplePatternElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TuplePatternElementSyntax) { } @@ -3029,7 +3029,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TuplePatternSyntax`` and its descendents. + /// The function called after visiting ``TuplePatternSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TuplePatternSyntax) { } @@ -3041,7 +3041,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TupleTypeElementListSyntax`` and its descendents. + /// The function called after visiting ``TupleTypeElementListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TupleTypeElementListSyntax) { } @@ -3053,7 +3053,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TupleTypeElementSyntax`` and its descendents. + /// The function called after visiting ``TupleTypeElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TupleTypeElementSyntax) { } @@ -3065,7 +3065,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TupleTypeSyntax`` and its descendents. + /// The function called after visiting ``TupleTypeSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TupleTypeSyntax) { } @@ -3077,7 +3077,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TypeAnnotationSyntax`` and its descendents. + /// The function called after visiting ``TypeAnnotationSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TypeAnnotationSyntax) { } @@ -3089,7 +3089,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TypeEffectSpecifiersSyntax`` and its descendents. + /// The function called after visiting ``TypeEffectSpecifiersSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TypeEffectSpecifiersSyntax) { } @@ -3101,7 +3101,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TypeExprSyntax`` and its descendents. + /// The function called after visiting ``TypeExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TypeExprSyntax) { } @@ -3113,7 +3113,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TypeInheritanceClauseSyntax`` and its descendents. + /// The function called after visiting ``TypeInheritanceClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TypeInheritanceClauseSyntax) { } @@ -3125,7 +3125,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TypeInitializerClauseSyntax`` and its descendents. + /// The function called after visiting ``TypeInitializerClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TypeInitializerClauseSyntax) { } @@ -3137,7 +3137,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``TypealiasDeclSyntax`` and its descendents. + /// The function called after visiting ``TypealiasDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TypealiasDeclSyntax) { } @@ -3149,7 +3149,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``UnavailableFromAsyncArgumentsSyntax`` and its descendents. + /// The function called after visiting ``UnavailableFromAsyncArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: UnavailableFromAsyncArgumentsSyntax) { } @@ -3161,7 +3161,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``UnderscorePrivateAttributeArgumentsSyntax`` and its descendents. + /// The function called after visiting ``UnderscorePrivateAttributeArgumentsSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: UnderscorePrivateAttributeArgumentsSyntax) { } @@ -3173,7 +3173,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``UnexpectedNodesSyntax`` and its descendents. + /// The function called after visiting ``UnexpectedNodesSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: UnexpectedNodesSyntax) { } @@ -3185,7 +3185,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``UnresolvedAsExprSyntax`` and its descendents. + /// The function called after visiting ``UnresolvedAsExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: UnresolvedAsExprSyntax) { } @@ -3197,7 +3197,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``UnresolvedIsExprSyntax`` and its descendents. + /// The function called after visiting ``UnresolvedIsExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: UnresolvedIsExprSyntax) { } @@ -3209,7 +3209,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``UnresolvedPatternExprSyntax`` and its descendents. + /// The function called after visiting ``UnresolvedPatternExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: UnresolvedPatternExprSyntax) { } @@ -3221,7 +3221,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``UnresolvedTernaryExprSyntax`` and its descendents. + /// The function called after visiting ``UnresolvedTernaryExprSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: UnresolvedTernaryExprSyntax) { } @@ -3233,7 +3233,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``ValueBindingPatternSyntax`` and its descendents. + /// The function called after visiting ``ValueBindingPatternSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: ValueBindingPatternSyntax) { } @@ -3245,7 +3245,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``VariableDeclSyntax`` and its descendents. + /// The function called after visiting ``VariableDeclSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: VariableDeclSyntax) { } @@ -3257,7 +3257,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``VersionComponentListSyntax`` and its descendents. + /// The function called after visiting ``VersionComponentListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: VersionComponentListSyntax) { } @@ -3269,7 +3269,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``VersionComponentSyntax`` and its descendents. + /// The function called after visiting ``VersionComponentSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: VersionComponentSyntax) { } @@ -3281,7 +3281,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``VersionTupleSyntax`` and its descendents. + /// The function called after visiting ``VersionTupleSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: VersionTupleSyntax) { } @@ -3293,7 +3293,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``WhereClauseSyntax`` and its descendents. + /// The function called after visiting ``WhereClauseSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: WhereClauseSyntax) { } @@ -3305,7 +3305,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``WhileStmtSyntax`` and its descendents. + /// The function called after visiting ``WhileStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: WhileStmtSyntax) { } @@ -3317,7 +3317,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``WildcardPatternSyntax`` and its descendents. + /// The function called after visiting ``WildcardPatternSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: WildcardPatternSyntax) { } @@ -3329,7 +3329,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``YieldExprListElementSyntax`` and its descendents. + /// The function called after visiting ``YieldExprListElementSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: YieldExprListElementSyntax) { } @@ -3341,7 +3341,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``YieldExprListSyntax`` and its descendents. + /// The function called after visiting ``YieldExprListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: YieldExprListSyntax) { } @@ -3353,7 +3353,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``YieldListSyntax`` and its descendents. + /// The function called after visiting ``YieldListSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: YieldListSyntax) { } @@ -3365,7 +3365,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting ``YieldStmtSyntax`` and its descendents. + /// The function called after visiting ``YieldStmtSyntax`` and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: YieldStmtSyntax) { } @@ -3377,7 +3377,7 @@ open class SyntaxVisitor { return .visitChildren } - /// The function called after visiting the node and its descendents. + /// The function called after visiting the node and its descendants. /// - node: the node we just finished visiting. open func visitPost(_ node: TokenSyntax) { } diff --git a/Sources/SwiftSyntax/generated/TriviaPieces.swift b/Sources/SwiftSyntax/generated/TriviaPieces.swift index bcac304b1d5..8f9974a29e7 100644 --- a/Sources/SwiftSyntax/generated/TriviaPieces.swift +++ b/Sources/SwiftSyntax/generated/TriviaPieces.swift @@ -300,7 +300,7 @@ extension TriviaPiece { /// Trivia piece for token RawSyntax. /// /// In contrast to ``TriviaPiece``, a ``RawTriviaPiece`` does not own the source -/// text of a the trivia. +/// text of the trivia. @_spi(RawSyntax) public enum RawTriviaPiece: Equatable { case backslashes(Int) diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxDeclNodes.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxDeclNodes.swift index a42fe8863b4..cac7909cb87 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxDeclNodes.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxDeclNodes.swift @@ -3547,9 +3547,9 @@ public struct InitializerDeclSyntax: DeclSyntaxProtocol, SyntaxHashable { /// - initKeyword: The init keyword /// - optionalMark: If the initializer is failable, a question mark to indicate that. /// - genericParameterClause: Generic parameters of the initializer. - /// - signature: The arguments of the initializer. While the function signature allows specifying an return clause, doing so is not semantically valid. + /// - signature: The arguments of the initializer. While the function signature allows specifying a return clause, doing so is not semantically valid. /// - genericWhereClause: If the initializer had generic parameters, a where clause that can restrict those - /// - body: The initializer’s body. Missing if the initialier is a requirement of a protocol declaration. + /// - body: The initializer’s body. Missing if the initializer is a requirement of a protocol declaration. /// - trailingTrivia: Trivia to be appended to the trailing trivia of the node’s last token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored. public init( leadingTrivia: Trivia? = nil, @@ -3778,7 +3778,7 @@ public struct InitializerDeclSyntax: DeclSyntaxProtocol, SyntaxHashable { } } - /// The arguments of the initializer. While the function signature allows specifying an return clause, doing so is not semantically valid. + /// The arguments of the initializer. While the function signature allows specifying a return clause, doing so is not semantically valid. public var signature: FunctionSignatureSyntax { get { return FunctionSignatureSyntax(data.child(at: 11, parent: Syntax(self))!) @@ -3816,7 +3816,7 @@ public struct InitializerDeclSyntax: DeclSyntaxProtocol, SyntaxHashable { } } - /// The initializer’s body. Missing if the initialier is a requirement of a protocol declaration. + /// The initializer’s body. Missing if the initializer is a requirement of a protocol declaration. public var body: CodeBlockSyntax? { get { return data.child(at: 15, parent: Syntax(self)).map(CodeBlockSyntax.init) diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxExprNodes.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxExprNodes.swift index facc73a1177..bb3364fb415 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxExprNodes.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxExprNodes.swift @@ -4162,7 +4162,7 @@ public struct MemberAccessExprSyntax: ExprSyntaxProtocol, SyntaxHashable { // MARK: - MissingExprSyntax -/// In case the source code is missing a expression, this node stands in place of the missing expression. +/// In case the source code is missing an expression, this node stands in place of the missing expression. /// /// ### Children /// diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift index 00e9727f8ee..ee7ba63b276 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift @@ -1979,7 +1979,7 @@ public struct AvailabilityEntrySyntax: SyntaxProtocol, SyntaxHashable { // MARK: - AvailabilityLabeledArgumentSyntax -/// A argument to an `@available` attribute that consists of a label and a value, e.g. `message: "This has been deprecated"`. +/// An argument to an `@available` attribute that consists of a label and a value, e.g. `message: "This has been deprecated"`. /// /// ### Children /// diff --git a/Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift b/Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift index cfe05d963be..325c55b3c36 100644 --- a/Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift +++ b/Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift @@ -138,9 +138,9 @@ extension ExprSyntax { /// /// Conformances will generally handle edge cases sensibly: `String` will /// use raw literals and escapes as needed, `Optional` will wrap a nested - /// `nil` in `.some`, `Double` wil represent special values like infinities + /// `nil` in `.some`, `Double` will represent special values like infinities /// as code sequences like `.infinity`, etc. `Set` and `Dictionary` sort - /// thier elements to improve stability. + /// their elements to improve stability. /// /// Because of that intelligent behavior, this initializer is not guaranteed /// to produce a literal as the outermost syntax node, or even to have a diff --git a/Sources/SwiftSyntaxBuilder/Documentation.docc/Index.md b/Sources/SwiftSyntaxBuilder/Documentation.docc/Index.md index a093a02d74c..8e3830ab20a 100644 --- a/Sources/SwiftSyntaxBuilder/Documentation.docc/Index.md +++ b/Sources/SwiftSyntaxBuilder/Documentation.docc/Index.md @@ -1,3 +1,3 @@ # ``SwiftSyntaxBuilder`` -SwiftSyntaxBuiler is a tool for generating Swift code in a convenient way using result builders. \ No newline at end of file +SwiftSyntaxBuilder is a tool for generating Swift code in a convenient way using result builders. diff --git a/Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift b/Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift index e5667cb2365..1f2e808aa70 100644 --- a/Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift +++ b/Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -// This file provides compatiblity aliases to keep dependents of SwiftSyntaxBuilder building. +// This file provides compatibility aliases to keep dependents of SwiftSyntaxBuilder building. // All users of the declarations in this file should transition away from them ASAP. import SwiftSyntax @@ -19,6 +19,6 @@ import SwiftSyntax public typealias AccessPathBuilder = ImportPathBuilder //==========================================================================// -// IMPORTANT: If you are tempted to add a compatiblity layer code here // +// IMPORTANT: If you are tempted to add a compatibility layer code here // // please insert it in alphabetical order above // //==========================================================================// diff --git a/Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift b/Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift index 5b5fb0628b2..42f1e4652fa 100644 --- a/Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift +++ b/Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift @@ -328,9 +328,9 @@ public extension SwitchExprSyntax { // So we cannot conform to `HasTrailingCodeBlock` or `HasTrailingMemberDeclBlock` public extension VariableDeclSyntax { - /// Construct a variable with a single `get` accessor where `header` builds the text beofre the opening `{` and `accessor` builds the accessor body. + /// Construct a variable with a single `get` accessor where `header` builds the text before the opening `{` and `accessor` builds the accessor body. /// - /// For example, to construt + /// For example, to construct /// /// ```swift /// var x: Int { diff --git a/Sources/SwiftSyntaxMacroExpansion/MacroExpansion.swift b/Sources/SwiftSyntaxMacroExpansion/MacroExpansion.swift index d6a907e8e03..555e2a165a1 100644 --- a/Sources/SwiftSyntaxMacroExpansion/MacroExpansion.swift +++ b/Sources/SwiftSyntaxMacroExpansion/MacroExpansion.swift @@ -81,7 +81,7 @@ private enum MacroExpansionError: Error, CustomStringConvertible { /// - macroRole: indicates which `Macro` protocol expansion should be performed /// - node: macro expansion syntax node (e.g. `#macroName(argument)`). /// - in: context of the expansion. -/// - Returns: expanded source text. Upon failure (i.e. `defintion.expansion()` +/// - Returns: expanded source text. Upon failure (i.e. `definition.expansion()` /// throws) returns `nil`, and the diagnostics representing the `Error` are /// guaranteed to be added to context. public func expandFreestandingMacro( @@ -173,7 +173,7 @@ public func expandFreestandingMacro( /// context node of `declarationNode`. /// - in: context of the expansion. /// - Returns: A list of expanded source text. Upon failure (i.e. -/// `defintion.expansion()` throws) returns `nil`, and the diagnostics +/// `definition.expansion()` throws) returns `nil`, and the diagnostics /// representing the `Error` are guaranteed to be added to context. public func expandAttachedMacroWithoutCollapsing( definition: Macro.Type, diff --git a/Sources/SwiftSyntaxMacroExpansion/MacroReplacement.swift b/Sources/SwiftSyntaxMacroExpansion/MacroReplacement.swift index 09a62b718d1..e12c96edd4a 100644 --- a/Sources/SwiftSyntaxMacroExpansion/MacroReplacement.swift +++ b/Sources/SwiftSyntaxMacroExpansion/MacroReplacement.swift @@ -168,13 +168,13 @@ extension MacroDeclSyntax { /// /// Macros are defined by an expression, which must itself be a macro /// expansion. Check the definition and produce a semantic representation of - /// it or one of the "builtin" + /// it or one of the "builtin" /// /// Compute the sequence of parameter replacements required when expanding /// the definition of a non-external macro. /// /// If there are an errors that prevent expansion, the diagnostics will be - /// wrapped into a an error that prevents expansion, that error is thrown. + /// wrapped into an error that prevents expansion, that error is thrown. public func checkDefinition() throws -> MacroDefinition { // Cannot compute replacements for an undefined macro. guard let originalDefinition = definition?.value else { diff --git a/Sources/SwiftSyntaxMacros/MacroExpansionContext.swift b/Sources/SwiftSyntaxMacros/MacroExpansionContext.swift index ead0ff5f69f..801c98569c0 100644 --- a/Sources/SwiftSyntaxMacros/MacroExpansionContext.swift +++ b/Sources/SwiftSyntaxMacros/MacroExpansionContext.swift @@ -130,7 +130,7 @@ public enum PositionInSyntaxNode { case afterTrailingTrivia } -/// Describes how the a source location file path +/// Describes the source location file path public enum SourceLocationFilePathMode { /// A file ID consisting of the module name and file name (without full path), /// as would be generated by the macro expansion `#fileID`. diff --git a/Sources/_SwiftSyntaxTestSupport/LocationMarkers.swift b/Sources/_SwiftSyntaxTestSupport/LocationMarkers.swift index 15c37a0b87b..4bb741c3d97 100644 --- a/Sources/_SwiftSyntaxTestSupport/LocationMarkers.swift +++ b/Sources/_SwiftSyntaxTestSupport/LocationMarkers.swift @@ -46,7 +46,7 @@ fileprivate struct Marker { let name: Substring /// The range of the marker. /// - /// If the marker contains all the the non-whitepace characters on the line, + /// If the marker contains all the non-whitespace characters on the line, /// this is the range of the entire line. Otherwise it's the range of the /// marker itself. let range: Range diff --git a/Sources/_SwiftSyntaxTestSupport/Syntax+Assertions.swift b/Sources/_SwiftSyntaxTestSupport/Syntax+Assertions.swift index c11f3310656..77a472cfb11 100644 --- a/Sources/_SwiftSyntaxTestSupport/Syntax+Assertions.swift +++ b/Sources/_SwiftSyntaxTestSupport/Syntax+Assertions.swift @@ -109,7 +109,7 @@ public struct SubtreeMatcher { return subtree.findFirstDifference(baseline: baseline, includeTrivia: includeTrivia) } - /// Verifies that the the subtree found from parsing the text passed into + /// Verifies that the subtree found from parsing the text passed into /// `init(markedText:)` has the same structure as `expected`. public func assertSameStructure( afterMarker: String? = nil, diff --git a/Tests/PerformanceTest/VisitorPerformanceTests.swift b/Tests/PerformanceTest/VisitorPerformanceTests.swift index 6eec84bff5c..208b20e1540 100644 --- a/Tests/PerformanceTest/VisitorPerformanceTests.swift +++ b/Tests/PerformanceTest/VisitorPerformanceTests.swift @@ -57,7 +57,7 @@ public class VisitorPerformanceTests: XCTestCase { ) } - func testEmptyAnyVistorPerformance() throws { + func testEmptyAnyVisitorPerformance() throws { try XCTSkipIf(ProcessInfo.processInfo.environment["SKIP_LONG_TESTS"] == "1") class EmptyAnyVisitor: SyntaxAnyVisitor {} diff --git a/Tests/SwiftParserTest/DeclarationTests.swift b/Tests/SwiftParserTest/DeclarationTests.swift index b6ec62ba2c7..0926107bf49 100644 --- a/Tests/SwiftParserTest/DeclarationTests.swift +++ b/Tests/SwiftParserTest/DeclarationTests.swift @@ -837,7 +837,7 @@ final class DeclarationTests: XCTestCase { assertParse( "func test() -> 1️⃣throws Int", diagnostics: [ - DiagnosticSpec(message: "'throws' must preceed '->'", fixIts: ["move 'throws' in front of '->'"]) + DiagnosticSpec(message: "'throws' must precede '->'", fixIts: ["move 'throws' in front of '->'"]) ], fixedSource: "func test() throws -> Int" ) diff --git a/Tests/SwiftParserTest/ExpressionTests.swift b/Tests/SwiftParserTest/ExpressionTests.swift index fadd7517c8e..bba49beb7a9 100644 --- a/Tests/SwiftParserTest/ExpressionTests.swift +++ b/Tests/SwiftParserTest/ExpressionTests.swift @@ -962,7 +962,7 @@ final class ExpressionTests: XCTestCase { assertParse( "[(Int) -> 1️⃣throws Int]()", diagnostics: [ - DiagnosticSpec(message: "'throws' must preceed '->'", fixIts: ["move 'throws' in front of '->'"]) + DiagnosticSpec(message: "'throws' must precede '->'", fixIts: ["move 'throws' in front of '->'"]) ], fixedSource: "[(Int) throws -> Int]()" ) @@ -970,7 +970,7 @@ final class ExpressionTests: XCTestCase { assertParse( "[(Int) -> 1️⃣async throws Int]()", diagnostics: [ - DiagnosticSpec(message: "'async throws' must preceed '->'", fixIts: ["move 'async throws' in front of '->'"]) + DiagnosticSpec(message: "'async throws' must precede '->'", fixIts: ["move 'async throws' in front of '->'"]) ], fixedSource: "[(Int) async throws -> Int]()" ) diff --git a/Tests/SwiftParserTest/translated/AsyncTests.swift b/Tests/SwiftParserTest/translated/AsyncTests.swift index 1360e4725b0..640da80996d 100644 --- a/Tests/SwiftParserTest/translated/AsyncTests.swift +++ b/Tests/SwiftParserTest/translated/AsyncTests.swift @@ -56,7 +56,7 @@ final class AsyncTests: XCTestCase { "func asyncGlobal4() -> Int 1️⃣async { }", diagnostics: [ DiagnosticSpec( - message: "'async' must preceed '->'", + message: "'async' must precede '->'", fixIts: ["move 'async' in front of '->'"] ) ], @@ -69,7 +69,7 @@ final class AsyncTests: XCTestCase { "func asyncGlobal5() -> Int 1️⃣async throws { }", diagnostics: [ DiagnosticSpec( - message: "'async throws' must preceed '->'", + message: "'async throws' must precede '->'", fixIts: ["move 'async throws' in front of '->'"] ) ], @@ -82,7 +82,7 @@ final class AsyncTests: XCTestCase { "func asyncGlobal6() -> Int 1️⃣throws async { }", diagnostics: [ DiagnosticSpec( - message: "'throws async' must preceed '->'", + message: "'throws async' must precede '->'", fixIts: ["move 'throws async' in front of '->'"] ) ], @@ -95,7 +95,7 @@ final class AsyncTests: XCTestCase { "func asyncGlobal7() throws -> Int 1️⃣async { }", diagnostics: [ DiagnosticSpec( - message: "'async' must preceed '->'", + message: "'async' must precede '->'", fixIts: ["move 'async' in front of '->'"] ) ], @@ -117,12 +117,12 @@ final class AsyncTests: XCTestCase { ), DiagnosticSpec( locationMarker: "2️⃣", - message: "'async' must preceed '->'", + message: "'async' must precede '->'", fixIts: ["remove redundant 'async'"] ), DiagnosticSpec( locationMarker: "3️⃣", - message: "'async' must preceed '->'", + message: "'async' must precede '->'", fixIts: ["remove redundant 'async'"] ), ], @@ -219,7 +219,7 @@ final class AsyncTests: XCTestCase { """, diagnostics: [ DiagnosticSpec( - message: "'async' must preceed '->'", + message: "'async' must precede '->'", fixIts: ["move 'async' in front of '->'"] ) ], diff --git a/Tests/SwiftParserTest/translated/ErrorsTests.swift b/Tests/SwiftParserTest/translated/ErrorsTests.swift index bce9c304820..7ae5026e389 100644 --- a/Tests/SwiftParserTest/translated/ErrorsTests.swift +++ b/Tests/SwiftParserTest/translated/ErrorsTests.swift @@ -113,7 +113,7 @@ final class ErrorsTests: XCTestCase { } """, diagnostics: [ - DiagnosticSpec(message: "'throws' must preceed '->'", fixIts: ["move 'throws' in front of '->'"]) + DiagnosticSpec(message: "'throws' must precede '->'", fixIts: ["move 'throws' in front of '->'"]) ], fixedSource: """ func postThrows() throws -> Int { @@ -131,7 +131,7 @@ final class ErrorsTests: XCTestCase { } """, diagnostics: [ - DiagnosticSpec(message: "'throws' must preceed '->'", fixIts: ["move 'throws' in front of '->'"]) + DiagnosticSpec(message: "'throws' must precede '->'", fixIts: ["move 'throws' in front of '->'"]) ], fixedSource: """ func postThrows2() throws -> Int { @@ -149,7 +149,7 @@ final class ErrorsTests: XCTestCase { } """, diagnostics: [ - DiagnosticSpec(message: "'rethrows' must preceed '->'", fixIts: ["move 'rethrows' in front of '->'"]) + DiagnosticSpec(message: "'rethrows' must precede '->'", fixIts: ["move 'rethrows' in front of '->'"]) ], fixedSource: """ func postRethrows(_ f: () throws -> Int) rethrows -> Int { @@ -167,7 +167,7 @@ final class ErrorsTests: XCTestCase { } """, diagnostics: [ - DiagnosticSpec(message: "'rethrows' must preceed '->'", fixIts: ["move 'rethrows' in front of '->'"]) + DiagnosticSpec(message: "'rethrows' must precede '->'", fixIts: ["move 'rethrows' in front of '->'"]) ], fixedSource: """ func postRethrows2(_ f: () throws -> Int) rethrows -> Int { @@ -185,7 +185,7 @@ final class ErrorsTests: XCTestCase { } """, diagnostics: [ - DiagnosticSpec(message: "'throws' must preceed '->'", fixIts: ["move 'throws' in front of '->'"]) + DiagnosticSpec(message: "'throws' must precede '->'", fixIts: ["move 'throws' in front of '->'"]) ], fixedSource: """ func postThrows3() { @@ -209,12 +209,12 @@ final class ErrorsTests: XCTestCase { ), DiagnosticSpec( locationMarker: "2️⃣", - message: "'throws' must preceed '->'", + message: "'throws' must precede '->'", fixIts: ["remove redundant 'throws'"] ), DiagnosticSpec( locationMarker: "3️⃣", - message: "'throw' must preceed '->'", + message: "'throw' must precede '->'", fixIts: ["remove redundant 'throw'"] ), ], @@ -231,7 +231,7 @@ final class ErrorsTests: XCTestCase { """, diagnostics: [ DiagnosticSpec( - message: "'rethrows' must preceed '->'", + message: "'rethrows' must precede '->'", fixIts: ["remove redundant 'rethrows'"] ) ], @@ -266,7 +266,7 @@ final class ErrorsTests: XCTestCase { """, diagnostics: [ DiagnosticSpec( - message: "'throws' must preceed '->'", + message: "'throws' must precede '->'", fixIts: ["remove redundant 'throws'"] ) ], @@ -368,7 +368,7 @@ final class ErrorsTests: XCTestCase { let fn: () -> 1️⃣throws Void """, diagnostics: [ - DiagnosticSpec(message: "'throws' must preceed '->'", fixIts: ["move 'throws' in front of '->'"]) + DiagnosticSpec(message: "'throws' must precede '->'", fixIts: ["move 'throws' in front of '->'"]) ], fixedSource: """ let fn: () throws -> Void diff --git a/Tests/SwiftParserTest/translated/TypeExprTests.swift b/Tests/SwiftParserTest/translated/TypeExprTests.swift index 63e51e4a350..072175f04f3 100644 --- a/Tests/SwiftParserTest/translated/TypeExprTests.swift +++ b/Tests/SwiftParserTest/translated/TypeExprTests.swift @@ -558,7 +558,7 @@ final class TypeExprTests: XCTestCase { let _ = [(Int) -> 1️⃣throws Int]() """, diagnostics: [ - DiagnosticSpec(message: "'throws' must preceed '->'", fixIts: ["move 'throws' in front of '->'"]) + DiagnosticSpec(message: "'throws' must precede '->'", fixIts: ["move 'throws' in front of '->'"]) ], fixedSource: """ let _ = [(Int) throws -> Int]() diff --git a/build-script.py b/build-script.py index 7c5c3d10492..5bca09a7f53 100755 --- a/build-script.py +++ b/build-script.py @@ -554,7 +554,7 @@ def test_command(args: argparse.Namespace) -> None: # ----------------------------------------------------------------------------- -# Arugment Parsing +# Argument Parsing _DESCRIPTION = """ Build and test script for SwiftSyntax.