Skip to content

Instantly share code, notes, and snippets.

@leogdion
Created September 16, 2025 16:52
Show Gist options
  • Save leogdion/a08f42c92f8fc1ab6e5689089ca1ee38 to your computer and use it in GitHub Desktop.
Save leogdion/a08f42c92f8fc1ab6e5689089ca1ee38 to your computer and use it in GitHub Desktop.

Framework

SwiftSyntax

A library for working with Swift code.

Overview

SwiftSyntax is a source accurate tree representation of Swift source code. It allows Swift tools to parse, inspect, generate, and transform Swift source code.

Topics

Articles

Working with SwiftSyntax

Learn the basics of working with Swift source code with the SwiftSyntax library.

Updating a Macro to a New Major swift-syntax Version

Guidance of how to version macros when a new major swift-syntax version is released.

Raw Syntax Validation for Macro Testing

A guide to using SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION in third-party Swift macro packages.

Glossary

Glossary of terms and abbreviations used in SwiftSyntax

Tutorials

Introduction to SwiftSyntax

SwiftSyntax provides the foundation for tools that inspect, manipulate, and transform Swift source code.

Syntax

Syntax

protocol SyntaxCollection

Trivia

Trivia

enum TriviaPiece

A contiguous stretch of a single kind of trivia. The constituent part of a Trivia collection.

enum TriviaPosition

Tokens

struct TokenSyntax

A Syntax node representing a single token.

enum TokenKind

Enumerates the kinds of tokens in the Swift language.

struct TokenSequence

Sequence of tokens that are part of the provided Syntax node.

enum SourcePresence

An indicator of whether a Syntax node was found or written in the source.

Syntax Visitors

class SyntaxVisitor

class SyntaxAnyVisitor

A SyntaxVisitor that can visit the nodes as generic Syntax values.

class SyntaxRewriter

/ Automatically generated by generate-swift-syntax / Do not edit directly!

enum SyntaxTreeViewMode

Specifies how missing and unexpected nodes should be handled when traversing a syntax tree.

enum SyntaxVisitorContinueKind

The enum describes how the SyntaxVisitor should continue after visiting the current node.

struct ReversedTokenSequence

Reverse sequence of tokens that are part of the provided Syntax node.

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

struct MacroDeclSyntax

struct MacroExpansionDeclSyntax

The expansion of a freestanding macro in a position that expects a declaration.

struct OperatorDeclSyntax

A Swift operator declaration.

struct PoundSourceLocationSyntax

struct PrecedenceGroupDeclSyntax

A Swift precedencegroup declaration.

struct ProtocolDeclSyntax

A protocol declaration

struct StructDeclSyntax

A struct declaration

struct SubscriptDeclSyntax

struct TypeAliasDeclSyntax

struct VariableDeclSyntax

Declaration of one or more variables

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

struct DiscardAssignmentExprSyntax

A _ that discards a value inside an assignment.

struct EditorPlaceholderExprSyntax

struct FloatLiteralExprSyntax

struct ForceUnwrapExprSyntax

struct FunctionCallExprSyntax

struct GenericSpecializationExprSyntax

struct IfExprSyntax

struct InOutExprSyntax

An expression prefixed with & to pass an argument to an inout parameter.

struct InfixOperatorExprSyntax

An infix operator call like 1 + 2.

struct IntegerLiteralExprSyntax

struct IsExprSyntax

Checks if an expression is of a given type.

struct KeyPathExprSyntax

A key path.

struct MacroExpansionExprSyntax

The expansion of a freestanding macro in a position that expects an expression.

struct MemberAccessExprSyntax

An expression that access a member like a function or a property.

struct NilLiteralExprSyntax

struct OptionalChainingExprSyntax

struct PackElementExprSyntax

A pack element expression spelled with each.

struct PackExpansionExprSyntax

A pack expansion expression spelled with repeat.

struct PatternExprSyntax

struct PostfixIfConfigExprSyntax

struct PostfixOperatorExprSyntax

struct PrefixOperatorExprSyntax

A prefix operator applied to a value.

struct RegexLiteralExprSyntax

struct SequenceExprSyntax

A flat list of expressions before operator folding using the SwiftOperators library.

struct SimpleStringLiteralExprSyntax

A simple string that can’t contain string interpolation and cannot have raw string delimiters.

struct StringLiteralExprSyntax

A string literal.

struct SubscriptCallExprSyntax

struct SuperExprSyntax

struct SwitchExprSyntax

A switch expression.

struct TernaryExprSyntax

The ternary operator with operator precedences resolved.

struct TryExprSyntax

An expression prefixed with try.

struct TupleExprSyntax

struct TypeExprSyntax

struct UnresolvedAsExprSyntax

The as keyword without any operands.

struct UnresolvedIsExprSyntax

The is keyword without any operands.

struct UnresolvedTernaryExprSyntax

The middle section of a ternary operator between ? and :.

Patterns

struct PatternSyntax

protocol PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

struct MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct IsTypePatternSyntax

struct TuplePatternSyntax

A pattern that contains a list of other pattern.

struct ValueBindingPatternSyntax

struct WildcardPatternSyntax

A pattern that represent a wildcard.

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

struct WhileStmtSyntax

struct YieldStmtSyntax

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

struct PackExpansionTypeSyntax

struct SomeOrAnyTypeSyntax

struct SuppressedTypeSyntax

struct TupleTypeSyntax

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

struct ClosureParameterSyntax

struct ClosureShorthandParameterListSyntax

A list of closure parameters that are not parenthesized and don’t have type annotations.

struct ClosureShorthandParameterSyntax

struct CodeBlockItemListSyntax

struct CodeBlockItemSyntax

A CodeBlockItem is any Syntax node that appears on its own line inside a CodeBlock.

struct CompositionTypeElementListSyntax

struct CompositionTypeElementSyntax

struct ConditionElementListSyntax

struct ConditionElementSyntax

struct DeclModifierListSyntax

struct DeclModifierSyntax

struct DeclNameArgumentListSyntax

struct DeclNameArgumentSyntax

struct DesignatedTypeListSyntax

struct DesignatedTypeSyntax

struct DictionaryElementListSyntax

struct DictionaryElementSyntax

An element inside a dictionary literal.

struct DifferentiabilityArgumentListSyntax

struct DifferentiabilityArgumentSyntax

A differentiability argument: either the “self” identifier, a function parameter name, or a function parameter index.

struct DocumentationAttributeArgumentListSyntax

The arguments of the ‘@_documentation’ attribute

struct DocumentationAttributeArgumentSyntax

struct EffectsAttributeArgumentListSyntax

The arguments of the ‘@_effects’ attribute. These will be parsed during the SIL stage.

struct EnumCaseElementListSyntax

A collection of 0 or more EnumCaseElementSyntax s.

struct EnumCaseElementSyntax

An element of an enum case, containing the name of the case and, optionally, either associated values or an assignment to a raw value.

struct EnumCaseParameterListSyntax

struct EnumCaseParameterSyntax

struct ExprListSyntax

A list of expressions connected by operators. This list is contained by a SequenceExprSyntax.

struct FunctionParameterListSyntax

A list of function parameters that are type annotated and a label. The function parameters are represented by FunctionParameterListSyntax.

struct FunctionParameterSyntax

A function parameter

struct GenericArgumentListSyntax

struct GenericArgumentSyntax

struct GenericParameterListSyntax

struct GenericParameterSyntax

struct GenericRequirementListSyntax

struct GenericRequirementSyntax

struct IfConfigClauseListSyntax

struct IfConfigClauseSyntax

struct ImportPathComponentListSyntax

struct ImportPathComponentSyntax

struct InheritedTypeListSyntax

struct InheritedTypeSyntax

struct KeyPathComponentListSyntax

The components of a key path

struct KeyPathComponentSyntax

A single key path component

struct LabeledExprListSyntax

struct LabeledExprSyntax

An expression that is prefixed by a label.

struct MemberBlockItemListSyntax

struct MemberBlockItemSyntax

A member declaration of a type consisting of a declaration and an optional semicolon;

struct MultipleTrailingClosureElementListSyntax

struct MultipleTrailingClosureElementSyntax

struct ObjCSelectorPieceListSyntax

struct ObjCSelectorPieceSyntax

A piece of an Objective-C selector. Either consisting of just an identifier for a nullary selector, an identifier and a colon for a labeled argument or just a colon for an unlabeled argument

struct PatternBindingListSyntax

struct PatternBindingSyntax

Defines variables inside a variable declaration.

struct PlatformVersionItemListSyntax

struct PlatformVersionItemSyntax

A single platform/version pair in an attribute, e.g. iOS 10.1.

struct PrecedenceGroupAttributeListSyntax

struct PrecedenceGroupRelationSyntax

Specify the new precedence group’s relation to existing precedence groups.

struct PrecedenceGroupAssignmentSyntax

Specifies the precedence of an operator when used in an operation that includes optional chaining.

struct PrecedenceGroupAssociativitySyntax

Specifies how a sequence of operators with the same precedence level are grouped together in the absence of grouping parentheses.

struct PrecedenceGroupNameListSyntax

struct PrecedenceGroupNameSyntax

struct PrimaryAssociatedTypeListSyntax

struct PrimaryAssociatedTypeSyntax

struct SimpleStringLiteralSegmentListSyntax

String literal segments that only can contain non string interpolated or extended escaped strings

struct StringSegmentSyntax

A literal segment inside a string segment.

struct SpecializeAttributeArgumentListSyntax

A collection of arguments for the @_specialize attribute

struct LabeledSpecializeArgumentSyntax

A labeled argument for the @_specialize attribute like exported: true

struct SpecializeAvailabilityArgumentSyntax

The availability argument for the _specialize attribute

struct SpecializeTargetFunctionArgumentSyntax

A labeled argument for the @_specialize attribute with a function decl value like target: myFunc(_:)

struct GenericWhereClauseSyntax

A where clause that places additional constraints on generic parameters like where Element: Hashable.

struct StringLiteralSegmentListSyntax

struct ExpressionSegmentSyntax

An interpolated expression inside a string literal.

struct SwitchCaseItemListSyntax

struct SwitchCaseItemSyntax

struct SwitchCaseListSyntax

struct SwitchCaseSyntax

struct TuplePatternElementListSyntax

A list of TuplePatternElementSyntax.

struct TuplePatternElementSyntax

An element that represents a single tuple value in TuplePatternElementListSyntax.

struct TupleTypeElementListSyntax

struct TupleTypeElementSyntax

struct TypeSpecifierListSyntax

struct SimpleTypeSpecifierSyntax

A specifier that can be attached to a type to eg. mark a parameter as inout or consuming

struct UnexpectedNodesSyntax

A collection of syntax nodes that occurred in the source code but could not be used to form a valid syntax tree.

struct VersionComponentListSyntax

struct VersionComponentSyntax

An element to represent a single component in a version, like .1.

struct YieldedExpressionListSyntax

struct YieldedExpressionSyntax

Attributes

struct BackDeployedAttributeArgumentsSyntax

A collection of arguments for the @backDeployed attribute

struct ConventionAttributeArgumentsSyntax

The arguments for the ‘@convention(…)’.

struct ConventionWitnessMethodAttributeArgumentsSyntax

The arguments for the ‘@convention(witness_method: …)’.

struct DerivativeAttributeArgumentsSyntax

The arguments for the ‘@derivative(of:)’ and ‘@transpose(of:)’ attributes: the ‘of:’ label, the original declaration name, and an optional differentiability parameter list.

struct DifferentiabilityArgumentsSyntax

The differentiability arguments.

struct DifferentiabilityWithRespectToArgumentSyntax

A clause containing differentiability parameters.

struct DifferentiableAttributeArgumentsSyntax

The arguments for the @differentiable attribute: an optional differentiability kind, an optional differentiability parameter clause, and an optional ‘where’ clause.

struct DynamicReplacementAttributeArgumentsSyntax

The arguments for the ‘@_dynamicReplacement’ attribute

struct ExposeAttributeArgumentsSyntax

The arguments for the ‘@_expose’ attribute

struct ImplementsAttributeArgumentsSyntax

The arguments for the @_implements attribute of the form Type, methodName(arg1Label:arg2Label:)

struct OpaqueReturnTypeOfAttributeArgumentsSyntax

The arguments for the ‘@_opaqueReturnTypeOf()’.

struct OriginallyDefinedInAttributeArgumentsSyntax

The arguments for the ‘@_originallyDefinedIn’ attribute

struct UnavailableFromAsyncAttributeArgumentsSyntax

The arguments for the ‘@_unavailableFromAsync’ attribute

struct UnderscorePrivateAttributeArgumentsSyntax

The arguments for the ‘@_private’ attribute

Miscellaneous Syntax

struct AccessorBlockSyntax

struct AccessorEffectSpecifiersSyntax

struct AccessorParametersSyntax

struct AvailabilityConditionSyntax

struct AvailabilityLabeledArgumentSyntax

An argument to an @available attribute that consists of a label and a value, e.g. message: "This has been deprecated".

struct ClosureCaptureClauseSyntax

struct ClosureCaptureSpecifierSyntax

struct ClosureParameterClauseSyntax

struct ClosureSignatureSyntax

struct CodeBlockSyntax

struct ConformanceRequirementSyntax

struct DeclModifierDetailSyntax

struct DeclNameArgumentsSyntax

struct DeinitializerEffectSpecifiersSyntax

struct EnumCaseParameterClauseSyntax

struct FunctionEffectSpecifiersSyntax

struct FunctionParameterClauseSyntax

struct FunctionSignatureSyntax

A function signature that defines the interface of the function.

struct GenericArgumentClauseSyntax

struct GenericParameterClauseSyntax

The parameter clause that defines the generic parameters.

struct InheritanceClauseSyntax

struct InitializerClauseSyntax

struct KeyPathOptionalComponentSyntax

A key path component like ? or !.

struct KeyPathPropertyComponentSyntax

A key path component like .property or .1.

struct KeyPathSubscriptComponentSyntax

A key path component like .[17]

struct LayoutRequirementSyntax

struct MatchingPatternConditionSyntax

struct MemberBlockSyntax

struct MissingSyntax

In case the source code is missing a syntax node, this node stands in place of the missing node.

struct OperatorPrecedenceAndTypesSyntax

A clause to specify precedence group in infix operator declarations, and designated types in any operator declaration.

struct OptionalBindingConditionSyntax

struct PlatformVersionSyntax

An argument to @available that restricts the availability on a certain platform to a version, e.g. iOS 10 or swift 3.4.

struct PoundSourceLocationArgumentsSyntax

struct PrimaryAssociatedTypeClauseSyntax

struct ReturnClauseSyntax

struct SameTypeRequirementSyntax

struct SourceFileSyntax

struct SwitchCaseLabelSyntax

struct SwitchDefaultLabelSyntax

struct ThrowsClauseSyntax

struct TypeAnnotationSyntax

struct TypeEffectSpecifiersSyntax

struct TypeInitializerClauseSyntax

struct VersionTupleSyntax

A version number like 1.2.0. Only the first version component is required. There might be an arbitrary number of following components.

struct WhereClauseSyntax

struct YieldedExpressionsClauseSyntax

Traits

protocol BracedSyntax

protocol DeclGroupSyntax

protocol EffectSpecifiersSyntax

protocol FreestandingMacroExpansionSyntax

protocol NamedDeclSyntax

protocol MissingNodeSyntax

Represents a layout node that is missing in the source file.

protocol ParenthesizedSyntax

protocol WithAttributesSyntax

protocol WithCodeBlockSyntax

protocol WithGenericParametersSyntax

Syntax nodes that have generic parameters.

protocol WithModifiersSyntax

protocol WithOptionalCodeBlockSyntax

protocol WithStatementsSyntax

protocol WithTrailingCommaSyntax

Syntax Position

struct AbsolutePosition

An absolute position in a source file as text - the absolute utf8Offset from the start of the file.

typealias ByteSourceRange Deprecated

struct SourceLocation

Represents a source location in a Swift file.

class SourceLocationConverter

Converts AbsolutePosition s of syntax nodes to SourceLocation s, and vice-versa. The AbsolutePosition s must be originating from nodes that are part of the same tree that was used to initialize this class.

struct SourceRange

Represents a half-open range in a Swift file.

struct SourceLength

The length a syntax node spans in the source code. From any AbsolutePosition you reach a node’s end location by adding its UTF-8 length.

Internals

protocol SyntaxProtocol

Provide common functionality for specialized syntax nodes. Extend this protocol to provide common functionality for all syntax nodes.

class SyntaxArena

A syntax arena owns the memory for all syntax nodes within it.

enum SyntaxEnum

Enum to exhaustively switch over all different syntax nodes.

protocol SyntaxHashable

Protocol that provides a common Hashable implementation for all syntax nodes

struct SyntaxIdentifier

Provides a stable and unique identity for Syntax nodes.

Classes

class ParsingSyntaxArena

SyntaxArena for parsing.

Protocols

protocol SyntaxChildChoices

Protocol for the enums nested inside Syntax nodes that enumerate all the possible types a child node might have.

Structures

struct Identifier

A canonicalized representation of an identifier that strips away backticks.

struct SourceEdit

A textual edit to the original source represented by a range and a replacement.

struct SyntaxCollectionIterator

An iterator over a SyntaxCollection.

struct TokenDiagnostic

If the token has an error that’s inherent to the token itself and not its surrounding structure, this defines the type of the error. byteOffset specifies at which offset the error occurred.

Functions

An assertion that is active in DEBUG builds, just like Swift.assert and additionally if assertions are explicitly requested by setting the SWIFTSYNTAX_ENABLE_ASSERTIONS conditional compilation flag. Use this instead of precondition in places where the assertion has a non-trivial cost but provides little value in release builds.

An assertion that is active in DEBUG builds, just like Swift.assertionFailure and additionally if assertions are explicitly requested by setting the SWIFTSYNTAX_ENABLE_ASSERTIONS conditional compilation flag.

Returns the bottommost node whose subtree contains all nodes in nodes.

Returns the bottommost node whose subtree contains both lhs and rhs.

Override Swift’s precondition with slightly changed semantics. In release builds, it also emits the error message upon failure, like fatalError. It can also be disabled by setting the SWIFTSYNTAX_DISABLE_PRECONDITION conditional compilation flag. Note that SWIFTSYNTAX_DISABLE_PRECONDITION does not disable preconditionFailure.

Type Aliases

typealias AccessPathComponentSyntax Deprecated

typealias AccessPathSyntax

Deprecated

typealias AccessorListSyntax Deprecated

typealias AccessorParameterSyntax Deprecated

typealias AssociatedtypeDeclSyntax Deprecated

typealias AttributedSyntax Deprecated

typealias AvailabilityEntrySyntax Deprecated

typealias AvailabilitySpecListSyntax Deprecated

typealias AvailabilityVersionRestrictionListEntrySyntax Deprecated

typealias AvailabilityVersionRestrictionListSyntax Deprecated

typealias AvailabilityVersionRestrictionSyntax Deprecated

typealias BackDeployedAttributeSpecListSyntax Deprecated

typealias CanImportExprSyntax Deprecated

typealias CanImportVersionInfoSyntax Deprecated

typealias CaseItemListSyntax Deprecated

typealias CaseItemSyntax Deprecated

typealias ClosureCaptureItemListSyntax Deprecated

typealias ClosureCaptureItemSpecifierSyntax Deprecated

typealias ClosureCaptureItemSyntax Deprecated

typealias ClosureCaptureSignatureSyntax Deprecated

typealias ClosureParamListSyntax Deprecated

typealias ClosureParamSyntax Deprecated

typealias ConstrainedSugarTypeSyntax Deprecated

typealias DeinitEffectSpecifiersSyntax Deprecated

typealias DerivativeRegistrationAttributeArgumentsSyntax Deprecated

typealias DesignatedTypeElementSyntax Deprecated

typealias DifferentiabilityParamListSyntax Deprecated

typealias DifferentiabilityParamSyntax Deprecated

typealias DifferentiabilityParamsClauseSyntax Deprecated

typealias DifferentiabilityParamsSyntax Deprecated

typealias DocumentationAttributeArgumentsSyntax Deprecated

typealias DynamicReplacementArgumentsSyntax Deprecated

typealias EffectsArgumentsSyntax Deprecated

typealias EnumCaseAssociatedValueSyntax Deprecated

typealias FallthroughStmtSyntax Deprecated

typealias ForInStmtSyntax Deprecated

typealias ForcedValueExprSyntax Deprecated

typealias IdentifiedDeclSyntax Deprecated

typealias IdentifierExprSyntax Deprecated

typealias IncrementalEdit Deprecated

typealias LabeledSpecializeEntrySyntax Deprecated

typealias MemberDeclBlockSyntax Deprecated

typealias MemberDeclListItemSyntax Deprecated

typealias MemberDeclListSyntax Deprecated

typealias MemberTypeIdentifierSyntax Deprecated

typealias ModifierListSyntax Deprecated

typealias MoveExprSyntax Deprecated

typealias ObjCSelectorSyntax Deprecated

typealias OriginallyDefinedInArgumentsSyntax Deprecated

typealias PackReferenceTypeSyntax Deprecated

typealias ParameterClauseSyntax Deprecated

typealias PostfixUnaryExprSyntax Deprecated

typealias PoundSourceLocationArgsSyntax Deprecated

typealias PrecedenceGroupNameElementSyntax Deprecated

typealias RepeatWhileStmtSyntax Deprecated

typealias SimpleTypeIdentifierSyntax Deprecated

typealias SpecializeAttributeSpecListSyntax Deprecated

typealias SpecializeExprSyntax Deprecated

typealias StringLiteralSegmentsSyntax Deprecated

typealias SubscriptExprSyntax Deprecated

typealias SuperRefExprSyntax Deprecated

typealias TargetFunctionEntrySyntax Deprecated

typealias TupleExprElementListSyntax Deprecated

typealias TupleExprElementSyntax Deprecated

typealias TypeInheritanceClauseSyntax Deprecated

typealias TypeSpecifierSyntax Deprecated

typealias TypealiasDeclSyntax Deprecated

typealias UnavailableFromAsyncArgumentsSyntax Deprecated

typealias UnresolvedPatternExprSyntax Deprecated

typealias YieldExprListElementSyntax Deprecated

typealias YieldExprListSyntax Deprecated

typealias YieldListSyntax Deprecated

Enumerations

enum DeclSyntaxEnum

Enum to exhaustively switch over all different Decl syntax nodes.

enum ExprSyntaxEnum

Enum to exhaustively switch over all different Expr syntax nodes.

enum Keyword

enum PatternSyntaxEnum

Enum to exhaustively switch over all different Pattern syntax nodes.

enum StmtSyntaxEnum

Enum to exhaustively switch over all different Stmt syntax nodes.

enum SyntaxKind

Enumerates the known kinds of Syntax represented in the Syntax tree.

enum SyntaxNodeStructure

Describes the statically allowed structure of a syntax tree node.

enum TypeSyntaxEnum

Enum to exhaustively switch over all different Type syntax nodes.

Extended Modules

Swift

  • SwiftSyntax
  • Overview
  • Topics

| |


  • SwiftSyntax
  • Working with SwiftSyntax

Article

Working with SwiftSyntax

Learn the basics of working with Swift source code with the SwiftSyntax library.

Overview

The SwiftSyntax library provides data structures and algorithms for inspecting, processing, and manipulating Swift source code with a high-level, safe, and efficient API. The SwiftSyntax library is the foundation upon which tools like the Swift parser, swift-format, and Swift macros are built.

Syntax Trees

SwiftSyntax is a library for representing Swift source code with a data structure called a syntax tree. The structure of a syntax tree reflects not just the relative order and position of text and whitespace in a file - its “lexical structure” - but also the relationship between nested syntactic elements and their neighbors - its “syntactic structure”.

The syntax tree was designed with three tenets in mind:

Immutability

The syntax tree is a fully immutable persistent data structure. Once created, the syntax tree never changes, and may only be modified by creating a new syntax tree. The SwiftSyntax library provides a number of APIs for modifying an existing syntax tree efficiently and safely. It does so by copying only the minimal amount of structure that has changed into the new tree. Any unchanged structure from the original tree becomes part of a shared core that is transparently wrapped by the new syntax tree. In this way, the SwiftSyntax library reuses and shares as much data as possible during syntactic transformations. This reduces the overall memory footprint and the overhead normally associated with copying large and complex data structures like 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 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.

Source Fidelity

The SwiftSyntax library is designed to represent not just text, but whitespace, comments, compiler directives, and otherwise invisible data like the Unicode byte order mark. Collectively, these non-syntax entities are referred to as “trivia”. The syntax tree holds on to every byte of information in the source text, and can render the original document with full accuracy and precision. This property is referred to as “source fidelity”, because the syntax tree is always a faithful recreation of the source code it was given as input.

Resilience

To achieve source fidelity, both well-formed and ill-formed source code must be equally representable in the syntax tree. The syntax tree can represent two broad classes of errors: missing syntax and unexpected syntax. Missing syntax provides a spot for a syntax element that was expected by a parser or lexical analyzer but was not present in source.

func (uhoh: Void) {} ^ Missing identifier

Missing syntactic elements are represented in the tree as tokens with a SourcePresence.missing source presence. These missing tokens are just as much a part of the syntax tree as SourcePresence.present nodes, and can be inspected and manipulated as normal syntax. One important use-case is a “healing linter” which can examine missing nodes and fill in keywords, identifiers, and placeholders as appropriate in addition to warning about syntactic nits.

Unexpected syntax is any superfluous text encountered by a parser or lexical analyzer.

func four score and seven years ago(uhoh: Void) {} ^~~~~~~~~~~~~~~~~~~~~~~~~ Unexpected text

Unexpected nodes allow parsers to gracefully recover during parsing by scanning forward in the input stream until they reach a known recovery point. The Swift parser included with the swift-syntax package uses this implementation strategy to great effect. This makes the parser resilient to a broad class of input errors that users of editors and IDEs would make during the course of an editing session.

Syntax Nodes

A syntax tree is made up of elements called syntax nodes. To help categorize and organize syntax nodes, SwiftSyntax defines a hierarchy of protocols for syntax nodes. At the top of this hierarchy is the SyntaxProtocol protocol. To represent related categories of syntax, SyntaxProtocol is further refined:

  • DeclSyntaxProtocol for declarations like struct s, class es, enum s and protocol s.

  • StmtSyntaxProtocol for statements like if, switch, and do.

  • ExprSyntaxProtocol for expressions like function calls, literals, and closures

  • PatternSyntaxProtocol for patterns like case (_, let x)

Syntax nodes form the “branches” of the syntax tree, as they are generally high-level collections of one or more syntax nodes. Taken together, these branches form the syntactic structure of the source code. This structure is used by compilers and static analyzers to process source code at a high level.

A special kind of syntax node is a SyntaxCollection, which represents syntax with a variable number of children. For example, a code block value can contain zero or more statements in between a pair of braces. To represent these children, a CodeBlockSyntax value has a statements accessor that returns a CodeBlockItemListSyntax value. The elements of this syntax collection are CodeBlockItemSyntax values.

Syntax Tokens

At the leaves of the syntax tree are TokenSyntax values. A token syntax value represents an atomic unit of syntax and any associated trivia, like an identifier and the whitespace around it. Taken together, the tokens of a syntax tree represent the lexical structure of the source code. This structure is used by linters and formatters to analyze the textual content of source code.

Syntax Trivia

Trivia includes whitespace, comments, compiler directives, and erroneous source code. Trivia contributes most meaningfully to the lexical structure of a document, but often has little bearing on its syntactic structure. For this reason, tools like compilers often discard trivia during source code processing. However, maintaining trivia is important for tools like editors, IDEs, formatters, and refactoring engines. SwiftSyntax represents trivia explicitly with the Trivia type. Trivia associated with token syntax can be inspected with the leadingTrivia and trailingTrivia accessors.

Navigating the Syntax Tree

The SwiftSyntax library provides a number of ways of traversing the syntactic structure of a syntax tree. Every syntax node includes a reference to its parent node via the parent accessor, and a reference to its child nodes via the children(viewMode:) method. The children of a syntax tree always appear in order and the associated viewMode allows the client to express their intent to process missing and unexpected syntax.

Syntax nodes also contain strongly-typed APIs to access those same child nodes individually. For example, ClassDeclSyntax provides an identifier to get the name of the class, as well as ClassDeclSyntax/members to get the syntax node representing the braced block with its members.

Most syntax analyzers want to work with more than one kind of syntax at a time, and traverse this syntax in a regular order starting from the root and working towards the leaves. SwiftSyntax provides a standard suite of classes and protocols for working with syntax traversals with a visitor-style API.

A SyntaxVisitor can be used to walk source code from the root to its leaves. To inspect a particular kind of syntax node, a client needs to override the corresponding visit method accepting that kind of syntax. The visit methods are invoked as part of an in-order traversal of the syntax tree. To provide a post-order traversal, the corresponding visitPost methods can be overridden.

Visitors that rewrite particular syntax nodes can be implemented as a subclass of SyntaxRewriter. Like a SyntaxVisitor, a client needs to override the corresponding visit method accepting the syntax node of interest, and return a rewritten syntax node as a result.

Modifying the Syntax Tree

The syntax trees provided by the SwiftSyntax library are immutable. All modifications of the syntax tree are expressed as in-place updates to an existing syntax tree, and return new syntax trees. SwiftSyntax provides a set of high-level APIs for expressing these modifications. In general, data in syntax nodes can be accessed via a getter and updated with a corresponding with* method. For example, the name of a class can be retrieved with the identifier accessor, and replaced with the ClassDeclSyntax/with(_:_:)-3exln update function. This method returns a new ClassDeclSyntax value.

Building Syntax Trees

The swift-syntax package provides the SwiftParser module to parse arbitrary source text into syntax trees. The Swift parser is appropriate for situations where code is provided by a user, or cannot otherwise by predicted ahead of time. However, there are often times when the structure of source code is known at build time. For these cases, the SwiftSyntax library provides a method for transparently interpreting string literals containing source code as syntax trees when the SwiftSyntaxBuilder module is also imported:

import SwiftSyntax import SwiftParser import SwiftSyntaxBuilder

// file is a source file syntax node containing the parsed value of the // provided text. let file: SourceFileSyntax = """ print("Hello, world!") """

String processing is not limited to string literals. Further interior string interpolations can be used to parameterize the code in syntax generating functions.

import SwiftSyntax import SwiftParser

return """ class (raw: name) {} """ }

Using string literals and interpolation to build up syntax provides a fluid and natural API for building up complex syntax trees. This is generally preferred to transforming syntax trees via a chain of with* calls.

See Also

Articles

Updating a Macro to a New Major swift-syntax Version

Guidance of how to version macros when a new major swift-syntax version is released.

Raw Syntax Validation for Macro Testing

A guide to using SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION in third-party Swift macro packages.

Glossary

Glossary of terms and abbreviations used in SwiftSyntax

  • Working with SwiftSyntax
  • Overview
  • Syntax Trees
  • Immutability
  • Source Fidelity
  • Resilience
  • Syntax Nodes
  • Syntax Tokens
  • Syntax Trivia
  • Navigating the Syntax Tree
  • Modifying the Syntax Tree
  • Building Syntax Trees
  • See Also

| |


  • SwiftSyntax
  • Updating a Macro to a New Major swift-syntax Version

Article

Updating a Macro to a New Major swift-syntax Version

Guidance of how to version macros when a new major swift-syntax version is released.

Summary

A macro can depend on multiple versions of swift-syntax. If it is affected by source-breaking changes in swift-syntax, it can check the version of swift-syntax it is compiling against using e.g. #if canImport(SwiftSyntax510).

Detailed Explanation

All the ideas described in the following apply to all packages that depend on swift-syntax, not only macros.

For simplicity, this article assumes that 509 is the current swift-syntax version and 510 the next, but everything applies to any other major swift-syntax version update, including version jumps to e.g. 600.

Any given version macro can depend on multiple major swift-syntax versions at once. For example, if a macro supports both swift-syntax 509 and swift-syntax 510, it may declare its dependency on swift-syntax as

.package(url: "https://github.com/swiftlang/swift-syntax.git", "509.0.0"..<"511.0.0"),

In order to handle breaking API changes, clients can wrap uses of such APIs in conditional compilation clauses that check the version of swift-syntax it is building against. All versions of swift-syntax ≥ 509 will include an empty SwiftSyntaxVersion509 module, swift-syntax ≥ 510 will include both a SwiftSyntaxVersion510 and SwiftSyntaxVersion509 module, and so on for any new releases. This allows clients to write

#elseif canImport(SwiftSyntax509) // code to support swift-syntax version 509

#endif

Representation of New Syntax with Old swift-syntax Versions

If a swift-syntax version is used that is older than the compiler’s version, then swift-syntax will not be able to represent the new syntactic structures (like new statements) in the source file because it doesn’t know about them.

In this case, swift-syntax will represent the unknown syntactic constructs as a mixture of unexpected syntax nodes in the unexpected* children of the syntax nodes. Depending on the macro’s behavior this might not pose any issues. For example, if the macro adds an completion-handler alternative to an async function, it most likely doesn’t care if some statement in the body couldn’t be parsed, since it is only interested in the signature.

See Also

Articles

Working with SwiftSyntax

Learn the basics of working with Swift source code with the SwiftSyntax library.

Raw Syntax Validation for Macro Testing

A guide to using SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION in third-party Swift macro packages.

Glossary

Glossary of terms and abbreviations used in SwiftSyntax

  • Updating a Macro to a New Major swift-syntax Version
  • Summary
  • Detailed Explanation
  • Representation of New Syntax with Old swift-syntax Versions
  • See Also

| |


  • SwiftSyntax
  • Raw Syntax Validation for Macro Testing

Article

Raw Syntax Validation for Macro Testing

A guide to using SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION in third-party Swift macro packages.

Introduction

SwiftSyntax is designed with fault tolerance in mind. When developing macros, it’s generally robust enough to handle incorrect syntax trees without major issues. However, for developers who want to ensure they’re using the SwiftSyntax API as intended, there’s an additional validation tool available: the SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION environment variable.

What SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION does?

This environment variable enables extra validation in SwiftSyntax during runtime. When activated, it checks:

  1. The correctness of each syntax node’s child kind.

  2. That tokens only use kinds specified in the CodeGeneration package’s syntax tree layout.

How to Use It

If you decide to use this feature for testing, you can enable it by setting the environment variable when running your tests:

SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION=true swift test

Example

Consider these two syntax examples:

Incorrect syntax:

let asyncSpecifier: TokenSyntax = "async"

Correct syntax:

let asyncSpecifier: TokenSyntax = .keyword(.async)

With raw syntax validation enabled, the incorrect syntax might produce an error like:

Fatal error: Error validating child at index 1 of typeEffectSpecifiers: Expected token with one of [keyword('async')] but received identifier with text 'async'

This error helps identify that you’re using an identifier where a keyword is expected. The correct syntax uses .keyword(.async), which properly specifies that ‘async’ should be treated as a keyword rather than an identifier.

Conclusion

While SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION isn’t necessary for third-party macro packages, it can be a useful tool during development and testing. It helps ensure you’re using the SwiftSyntax API as intended and can catch subtle issues that might affect formatting. However, remember that it comes with a performance cost and isn’t recommended for use in production environments.

See Also

Articles

Working with SwiftSyntax

Learn the basics of working with Swift source code with the SwiftSyntax library.

Updating a Macro to a New Major swift-syntax Version

Guidance of how to version macros when a new major swift-syntax version is released.

Glossary

Glossary of terms and abbreviations used in SwiftSyntax

  • Raw Syntax Validation for Macro Testing
  • Introduction
  • What SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION does?
  • How to Use It
  • Example
  • Conclusion
  • See Also

| |


  • SwiftSyntax
  • Glossary

Article

Glossary

Glossary of terms and abbreviations used in SwiftSyntax

Abbreviations and Terms

To avoid ongoing repetition of common long terms, SwiftSyntax uses a couple of abbreviations that are common in compiler projects.

Arena See SyntaxArena

Decl Abbreviation for Declaration

Expr Abbreviation for Expression

IfConfig Abbrevation for If Configuration. Refers to #if clauses in the source code.

Layout Node A layout node can have an arbitrary number of children and provides structure to the syntax tree. All Syntax nodes that aren’t TokenSyntax are layout nodes. For example a StructDeclSyntax consists of, among others, of the struct keyword, the name and the memberBlock. The latter is again a layout node that contains multiple children. Layout nodes never represent any source code in the syntax tree by themselves. All source code within the syntax tree is represented by tokens.

Node A layout node or token

RawSyntax The underlying storage of syntax nodes. These are manually memory managed inside an arena. You should not need to interact with them unless contributing to swift-syntax.

Stmt Abbreviation for Statement

Token See TokenSyntax

Trivia See Trivia

See Also

Articles

Working with SwiftSyntax

Learn the basics of working with Swift source code with the SwiftSyntax library.

Updating a Macro to a New Major swift-syntax Version

Guidance of how to version macros when a new major swift-syntax version is released.

Raw Syntax Validation for Macro Testing

A guide to using SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION in third-party Swift macro packages.

  • Glossary
  • Abbreviations and Terms
  • See Also

| |


Introduction to SwiftSyntax

SwiftSyntax provides the foundation for tools that inspect, manipulate, and transform Swift source code.

15min Estimated Time

Get started

Chapter 1 SwiftSyntax By Example

Explore the SwiftSyntax API by building a tool that sorts imports in a Swift file.

  1. SwiftSyntax By Example\ \ 15min

| |


  • SwiftSyntax
  • SyntaxCollection

Protocol

SyntaxCollection

protocol SyntaxCollection : BidirectionalCollection, ExpressibleByArrayLiteral, SyntaxProtocol where Self.Element : SyntaxProtocol, Self.Index == SyntaxChildrenIndex

SyntaxCollection.swift

Topics

Operators

Creates a new collection by concatenating the elements of a sequence and a collection.

Creates a new collection by concatenating the elements of a collection and a sequence.

Appends the elements of a sequence to a range-replaceable collection.

Associated Types

Required

Instance Methods

func append(Self.Element)

Adds an element to the end of the collection.

Adds the elements of a sequence to the end of this collection.

Creates a new collection by appending the provided syntax element to the children.

Deprecated

Returns a new SyntaxCollection that just contains the elements satisfying the given predicate.

Returns the index of the n-th element in this collection.

Return the index of node within this collection.

func insert(Self.Element, at: Self.Index)

Inserts a new element into the collection at the specified position.

Inserts the elements of a sequence into the collection at the specified position.

Creates a new collection by inserting the provided syntax element at the provided index in the children.

Creates a new collection by prepending the provided syntax element to the children.

Removes and returns the element at the specified position.

Removes the elements in the specified subrange from the collection.

Creates a new collection by removing the syntax element at the provided index.

Creates a new collection by removing the first element.

Creates a new collection by removing the last element.

Replace the nodes in subrange by newElements.

Creates a new collection by replacing the syntax element at the provided index.

Type Properties

static var syntaxKind: SyntaxKind

The SyntaxKind of the syntax node that conforms to SyntaxCollection.

Relationships

Inherits From

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.ExpressibleByArrayLiteral
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxProtocol

Conforming Types

  • AccessorDeclListSyntax
  • ArrayElementListSyntax
  • AttributeListSyntax
  • AvailabilityArgumentListSyntax
  • CatchClauseListSyntax
  • CatchItemListSyntax
  • ClosureCaptureListSyntax
  • ClosureParameterListSyntax
  • ClosureShorthandParameterListSyntax
  • CodeBlockItemListSyntax
  • CompositionTypeElementListSyntax
  • ConditionElementListSyntax
  • DeclModifierListSyntax
  • DeclNameArgumentListSyntax
  • DesignatedTypeListSyntax
  • DictionaryElementListSyntax
  • DifferentiabilityArgumentListSyntax
  • DocumentationAttributeArgumentListSyntax
  • EffectsAttributeArgumentListSyntax
  • EnumCaseElementListSyntax
  • EnumCaseParameterListSyntax
  • ExprListSyntax
  • FunctionParameterListSyntax
  • GenericArgumentListSyntax
  • GenericParameterListSyntax
  • GenericRequirementListSyntax
  • IfConfigClauseListSyntax
  • ImportPathComponentListSyntax
  • InheritedTypeListSyntax
  • KeyPathComponentListSyntax
  • LabeledExprListSyntax
  • MemberBlockItemListSyntax
  • MultipleTrailingClosureElementListSyntax
  • ObjCSelectorPieceListSyntax
  • PatternBindingListSyntax
  • PlatformVersionItemListSyntax
  • PrecedenceGroupAttributeListSyntax
  • PrecedenceGroupNameListSyntax
  • PrimaryAssociatedTypeListSyntax
  • SimpleStringLiteralSegmentListSyntax
  • SpecializeAttributeArgumentListSyntax
  • StringLiteralSegmentListSyntax
  • SwitchCaseItemListSyntax
  • SwitchCaseListSyntax
  • TuplePatternElementListSyntax
  • TupleTypeElementListSyntax
  • TypeSpecifierListSyntax
  • UnexpectedNodesSyntax
  • VersionComponentListSyntax
  • YieldedExpressionListSyntax

See Also

Syntax

SwiftSyntax

A library for working with Swift code.

  • SyntaxCollection
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TriviaPiece

Enumeration

TriviaPiece

A contiguous stretch of a single kind of trivia. The constituent part of a Trivia collection.

enum TriviaPiece

TriviaPieces.swift

Overview

For example, four spaces would be represented by .spaces(4)

In general, you should deal with the actual Trivia collection instead of individual pieces whenever possible.

Topics

Enumeration Cases

case backslashes(Int)

A backslash that is at the end of a line in a multi-line string literal to escape the newline.

case blockComment(String)

A developer block comment, starting with ‘/ ’ and ending with ’/’.

case carriageReturnLineFeeds(Int)

A newline consists of contiguous ‘\r’ and ‘\n’ characters.

case carriageReturns(Int)

A newline ‘\r’ character.

case docBlockComment(String)

A documentation block comment, starting with ‘/**’ and ending with ‘*/’.

case docLineComment(String)

A documentation line comment, starting with ‘///’ and excluding the trailing newline.

case formfeeds(Int)

A form-feed ‘f’ character.

case lineComment(String)

A developer line comment, starting with ‘//’ and excluding the trailing newline.

case newlines(Int)

A newline ‘\n’ character.

case pounds(Int)

A ‘#’ that is at the end of a line in a multi-line string literal to escape the newline.

case spaces(Int)

A space ’ ’ character.

case tabs(Int)

A tab ‘\t’ character.

case unexpectedText(String)

Any skipped unexpected text.

case verticalTabs(Int)

A vertical tab ‘\v’ character.

Instance Properties

var isComment: Bool

Returns true if this piece is a comment.

var isNewline: Bool

var isSpaceOrTab: Bool

var isWhitespace: Bool

Returns true if this piece is a newline, space or tab.

var sourceLength: SourceLength

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.Equatable
  • Swift.Sendable
  • Swift.TextOutputStreamable

See Also

Trivia

SwiftSyntax

A library for working with Swift code.

enum TriviaPosition

  • TriviaPiece
  • Overview
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • Trivia

Structure

Trivia

Trivia represent pieces of the source code that are not relevant to represent its semantic structure.

struct Trivia

Trivia.swift

Overview

The standard examples of trivia are spaces, newlines and comments.

The SwiftSyntax tree retains trivia to maintain round-tripness of the source code, ensuring that printing the entire syntax tree be rendered back into text that is byte-for-byte identical to the original source.

Each TokenSyntax can have multiple TriviaPiece s as either leading or trailing trivia, which occur before or after the token’s content, respectively. Trivia represents a collection of these TriviaPiece s

Topics

Operators

Concatenates two collections of Trivia into one collection.

static func += (inout Trivia, Trivia)

Concatenates two collections of Trivia into the left-hand side.

Initializers

Creates Trivia with the provided underlying pieces.

Instance Properties

var byteSize: Int

Get the number of bytes this trivia needs to be represented as UTF-8.

Deprecated

var isEmpty: Bool

Whether the Trivia contains no pieces.

let pieces: [TriviaPiece]

The pieces this trivia consists of. Each TriviaPiece can represent multiple characters, such as an entire comment or 4 spaces.

var sourceLength: SourceLength

The length of all the pieces in this Trivia.

Instance Methods

Creates a new Trivia by appending the given trivia to the end.

Creates a new Trivia by appending the provided TriviaPiece to the end.

Creates a new Trivia by merging in the given trivia. Only includes one copy of a common prefix of self and trivia.

Creates a new Trivia by merging the leading and trailing Trivia of triviaOf into the end of self. Only includes one copy of any common prefixes.

Type Properties

static var backslash: Trivia

Gets a piece of trivia for #”"# characters.

static var carriageReturn: Trivia

Gets a piece of trivia for “\r” characters.

static var carriageReturnLineFeed: Trivia

Gets a piece of trivia for “\r\n” characters.

static var formfeed: Trivia

Gets a piece of trivia for “\u{c}” characters.

static var newline: Trivia

Gets a piece of trivia for “\n” characters.

static var pound: Trivia

Gets a piece of trivia for “#” characters.

static var space: Trivia

Gets a piece of trivia for “ “ characters.

static var tab: Trivia

Gets a piece of trivia for “\t” characters.

static var verticalTab: Trivia

Gets a piece of trivia for “\u{b}” characters.

Type Methods

Returns a piece of trivia for some number of #”"# characters.

Returns a piece of trivia for BlockComment.

Returns a piece of trivia for some number of “\r\n” characters.

Returns a piece of trivia for some number of “\r” characters.

Returns a piece of trivia for DocBlockComment.

Returns a piece of trivia for DocLineComment.

Returns a piece of trivia for some number of “\u{c}” characters.

Returns a piece of trivia for LineComment.

Returns a piece of trivia for some number of “\n” characters.

Returns a piece of trivia for some number of “#” characters.

Returns a piece of trivia for some number of “ “ characters.

Returns a piece of trivia for some number of “\t” characters.

Returns a piece of trivia for UnexpectedText.

Returns a piece of trivia for some number of “\u{b}” characters.

Relationships

Conforms To

  • Swift.Collection

  • Swift.Copyable

  • Swift.CustomDebugStringConvertible

  • Swift.CustomStringConvertible

  • Swift.Equatable

  • Swift.ExpressibleByArrayLiteral

  • Swift.Sendable

  • Swift.Sequence

  • Swift.TextOutputStreamable

  • Trivia

  • Overview

  • Topics

  • Relationships

| |


  • SwiftSyntax
  • TriviaPosition

Enumeration

TriviaPosition

enum TriviaPosition

Trivia.swift

Topics

Enumeration Cases

case leading

case trailing

Relationships

Conforms To

  • Swift.Equatable
  • Swift.Hashable

See Also

Trivia

SwiftSyntax

A library for working with Swift code.

enum TriviaPiece

A contiguous stretch of a single kind of trivia. The constituent part of a Trivia collection.

  • TriviaPosition
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TokenSyntax

Structure

TokenSyntax

A Syntax node representing a single token.

struct TokenSyntax

TokenSyntax.swift

Overview

All source code of a syntax tree is represented by tokens – layout nodes never contain any source code by themselves.

A token consists of leading Trivia, i.e. whitespaces before the actual token contents, the token’s text and trailing Trivia after the token’s content.

Topics

Initializers

If node is a token, return the TokenSyntax that represents it. Otherwise, return nil.

init(TokenKind, leadingTrivia: Trivia, trailingTrivia: Trivia, presence: SourcePresence)

Construct a new token with the given kind, leadingTrivia, trailingTrivia and presence.

Instance Properties

var identifier: Identifier?

An identifier created from self.

var isEditorPlaceholder: Bool

Whether the token text is an editor placeholder or not.

var leadingTrivia: Trivia

The leading trivia (spaces, newlines, etc.) associated with this token.

var leadingTriviaLength: SourceLength

The length this node’s leading trivia takes up spelled out in source.

var presence: SourcePresence

Whether the token is present or missing.

var text: String

The text of the token as written in the source code, without any trivia.

var tokenDiagnostic: TokenDiagnostic?

If the token has a lexical error, the type of the error.

var tokenKind: TokenKind

The kind of token this node represents.

var totalLength: SourceLength

The length of this node including all of its trivia.

var trailingTrivia: Trivia

The trailing trivia (spaces, newlines, etc.) associated with this token.

var trailingTriviaLength: SourceLength

The length this node’s trailing trivia takes up spelled out in source.

var trimmedLength: SourceLength

The length this node takes up spelled out in the source, excluding its leading or trailing trivia.

Instance Methods

Attempts to cast the current leaf syntax node to a different specified type.

Deprecated

Force-casts the current leaf syntax node to a different specified type.

Checks if the current leaf syntax node can be cast to a different specified type.

Type Properties

static var structure: SyntaxNodeStructure

A token by itself has no structure, so we represent its structure by an empty layout node.

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Tokens

enum TokenKind

Enumerates the kinds of tokens in the Swift language.

struct TokenSequence

Sequence of tokens that are part of the provided Syntax node.

enum SourcePresence

An indicator of whether a Syntax node was found or written in the source.

  • TokenSyntax
  • Overview
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TokenKind

Enumeration

TokenKind

Enumerates the kinds of tokens in the Swift language.

enum TokenKind

TokenKind.swift

Topics

Enumeration Cases

case arrow

case atSign

case backslash

case backtick

case binaryOperator(String)

case colon

case comma

case dollarIdentifier(String)

case ellipsis

case endOfFile

case equal

case exclamationMark

case floatLiteral(String)

case identifier(String)

case infixQuestionMark

case integerLiteral(String)

case keyword(Keyword)

case leftAngle

case leftBrace

case leftParen

case leftSquare

case multilineStringQuote

case period

case postfixOperator(String)

case postfixQuestionMark

case pound

case poundAvailable

case poundElse

case poundElseif

case poundEndif

case poundIf

case poundSourceLocation

case poundUnavailable

case prefixAmpersand

case prefixOperator(String)

case rawStringPoundDelimiter(String)

case regexLiteralPattern(String)

case regexPoundDelimiter(String)

case regexSlash

case rightAngle

case rightBrace

case rightParen

case rightSquare

case semicolon

case shebang(String)

case singleQuote

case stringQuote

case stringSegment(String)

case unknown(String)

case wildcard

Instance Properties

var isPunctuation: Bool

Returns true if the token is a Swift punctuator.

Type Properties

static var eof: TokenKind Deprecated

static var leftSquareBracket: TokenKind Deprecated

static var poundAvailableKeyword: TokenKind Deprecated

static var poundElseKeyword: TokenKind Deprecated

static var poundElseifKeyword: TokenKind Deprecated

static var poundEndifKeyword: TokenKind Deprecated

static var poundIfKeyword: TokenKind Deprecated

static var poundSourceLocationKeyword: TokenKind Deprecated

static var poundUnavailableKeyword: TokenKind Deprecated

static var rightSquareBracket: TokenKind Deprecated

Relationships

Conforms To

  • Swift.Copyable
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable

See Also

Tokens

struct TokenSyntax

A Syntax node representing a single token.

struct TokenSequence

Sequence of tokens that are part of the provided Syntax node.

enum SourcePresence

An indicator of whether a Syntax node was found or written in the source.

  • TokenKind
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TokenSequence

Structure

TokenSequence

Sequence of tokens that are part of the provided Syntax node.

struct TokenSequence

TokenSequence.swift

Topics

Structures

struct Iterator

Iterates over a TokenSequence.

Initializers

init(Syntax, viewMode: SyntaxTreeViewMode)

Construct a TokenSequence that walks all tokens in node in source order, recursively walking into child nodes.

Instance Methods

Create an iterator that iterates over all the tokens in the sequence.

Iterate the tokens in reverse order.

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomReflectable
  • Swift.Sendable
  • Swift.Sequence

See Also

Tokens

struct TokenSyntax

A Syntax node representing a single token.

enum TokenKind

Enumerates the kinds of tokens in the Swift language.

enum SourcePresence

An indicator of whether a Syntax node was found or written in the source.

  • TokenSequence
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SourcePresence

Enumeration

SourcePresence

An indicator of whether a Syntax node was found or written in the source.

enum SourcePresence

SourcePresence.swift

Overview

A missing node does not mean, necessarily, that the source item is considered “implicit”, but rather that it was not found in the source.

Topics

Enumeration Cases

case missing

The syntax was expected or optional, but not found in the source.

case present

The syntax was authored by a human and found, or was generated.

Relationships

Conforms To

  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable

See Also

Tokens

struct TokenSyntax

A Syntax node representing a single token.

enum TokenKind

Enumerates the kinds of tokens in the Swift language.

struct TokenSequence

Sequence of tokens that are part of the provided Syntax node.

  • SourcePresence
  • Overview
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SyntaxVisitor

Class

SyntaxVisitor

class SyntaxVisitor

SyntaxVisitor.swift

Topics

Initializers

init(viewMode: SyntaxTreeViewMode)

Instance Properties

let viewMode: SyntaxTreeViewMode

Instance Methods

Visiting SwitchDefaultLabelSyntax specifically.

Visiting VersionTupleSyntax specifically.

Visiting ArrayElementListSyntax specifically.

Visiting BackDeployedAttributeArgumentsSyntax specifically.

Visiting KeyPathOptionalComponentSyntax specifically.

Visiting PrecedenceGroupAttributeListSyntax specifically.

Visiting IfExprSyntax specifically.

Visiting DoStmtSyntax specifically.

Visiting EnumCaseDeclSyntax specifically.

Visiting ReturnStmtSyntax specifically.

Visiting ObjCSelectorPieceListSyntax specifically.

Visiting TuplePatternSyntax specifically.

Visiting InfixOperatorExprSyntax specifically.

Visiting MissingPatternSyntax specifically.

Visiting PackElementExprSyntax specifically.

Visiting TupleTypeSyntax specifically.

Visiting TypeAnnotationSyntax specifically.

Visiting SequenceExprSyntax specifically.

Visiting SwitchCaseListSyntax specifically.

Visiting StringLiteralSegmentListSyntax specifically.

Visiting DeclNameArgumentsSyntax specifically.

Visiting KeyPathPropertyComponentSyntax specifically.

Visiting DifferentiabilityArgumentListSyntax specifically.

Visiting CodeBlockSyntax specifically.

Visiting SuperExprSyntax specifically.

Visiting MatchingPatternConditionSyntax specifically.

Visiting CatchClauseSyntax specifically.

Visiting LabeledExprListSyntax specifically.

Visiting SwitchCaseLabelSyntax specifically.

Visiting ClosureSignatureSyntax specifically.

Visiting ArrowExprSyntax specifically.

Visiting ThrowsClauseSyntax specifically.

Visiting ClassDeclSyntax specifically.

Visiting StringSegmentSyntax specifically.

Visiting SubscriptDeclSyntax specifically.

Visiting CatchClauseListSyntax specifically.

Visiting BorrowExprSyntax specifically.

Visiting FunctionTypeSyntax specifically.

Visiting MemberTypeSyntax specifically.

Visiting PatternExprSyntax specifically.

Visiting DiscardAssignmentExprSyntax specifically.

Visiting EnumCaseElementSyntax specifically.

Visiting GuardStmtSyntax specifically.

Visiting UnresolvedTernaryExprSyntax specifically.

Visiting YieldStmtSyntax specifically.

Visiting PoundSourceLocationSyntax specifically.

Visiting PlatformVersionItemSyntax specifically.

Visiting ConsumeExprSyntax specifically.

Visiting DeclModifierDetailSyntax specifically.

Visiting MacroExpansionExprSyntax specifically.

Visiting CompositionTypeElementListSyntax specifically.

Visiting AccessorDeclSyntax specifically.

Visiting RepeatStmtSyntax specifically.

Visiting MultipleTrailingClosureElementSyntax specifically.

Visiting RegexLiteralExprSyntax specifically.

Visiting LabeledStmtSyntax specifically.

Visiting FunctionParameterClauseSyntax specifically.

Visiting ConventionWitnessMethodAttributeArgumentsSyntax specifically.

Visiting SimpleStringLiteralExprSyntax specifically.

Visiting ClassRestrictionTypeSyntax specifically.

Visiting ExpressionStmtSyntax specifically.

Visiting GenericParameterListSyntax specifically.

Visiting DeinitializerEffectSpecifiersSyntax specifically.

Visiting DeclNameArgumentSyntax specifically.

Visiting InitializerClauseSyntax specifically.

Visiting CatchItemSyntax specifically.

Visiting ImportPathComponentSyntax specifically.

Visiting CodeBlockItemListSyntax specifically.

Visiting GenericParameterSyntax specifically.

Visiting InOutExprSyntax specifically.

Visiting YieldedExpressionSyntax specifically.

Visiting ExtensionDeclSyntax specifically.

Visiting ReturnClauseSyntax specifically.

Visiting FunctionSignatureSyntax specifically.

Visiting DifferentiabilityWithRespectToArgumentSyntax specifically.

Visiting ImportDeclSyntax specifically.

Visiting CopyExprSyntax specifically.

Visiting TuplePatternElementSyntax specifically.

Visiting ConditionElementListSyntax specifically.

Visiting PoundSourceLocationArgumentsSyntax specifically.

Visiting TypeEffectSpecifiersSyntax specifically.

Visiting ClosureParameterClauseSyntax specifically.

Visiting KeyPathExprSyntax specifically.

Visiting _CanImportVersionInfoSyntax specifically.

Visiting MissingSyntax specifically.

Visiting PrecedenceGroupNameListSyntax specifically.

Visiting MultipleTrailingClosureElementListSyntax specifically.

Visiting SubscriptCallExprSyntax specifically.

Visiting DictionaryElementSyntax specifically.

Visiting MetatypeTypeSyntax specifically.

Visiting IsExprSyntax specifically.

Visiting InheritedTypeSyntax specifically.

Visiting AvailabilityConditionSyntax specifically.

Visiting PrimaryAssociatedTypeSyntax specifically.

Visiting DeinitializerDeclSyntax specifically.

Visiting DerivativeAttributeArgumentsSyntax specifically.

Visiting PostfixIfConfigExprSyntax specifically.

Visiting MissingTypeSyntax specifically.

Visiting AvailabilityArgumentListSyntax specifically.

Visiting ClosureCaptureSpecifierSyntax specifically.

Visiting DeclModifierSyntax specifically.

Visiting PlatformVersionSyntax specifically.

Visiting PrimaryAssociatedTypeClauseSyntax specifically.

Visiting OperatorPrecedenceAndTypesSyntax specifically.

Visiting AccessorBlockSyntax specifically.

Visiting TupleTypeElementListSyntax specifically.

Visiting FunctionEffectSpecifiersSyntax specifically.

Visiting InheritedTypeListSyntax specifically.

Visiting SwitchCaseSyntax specifically.

Visiting LabeledSpecializeArgumentSyntax specifically.

Visiting DifferentiableAttributeArgumentsSyntax specifically.

Visiting EditorPlaceholderExprSyntax specifically.

Visiting UnresolvedIsExprSyntax specifically.

Visiting ImplicitlyUnwrappedOptionalTypeSyntax specifically.

Visiting GenericRequirementSyntax specifically.

Visiting KeyPathComponentListSyntax specifically.

Visiting GenericWhereClauseSyntax specifically.

Visiting OptionalTypeSyntax specifically.

Visiting FunctionParameterListSyntax specifically.

Visiting YieldedExpressionsClauseSyntax specifically.

Visiting ValueBindingPatternSyntax specifically.

Visiting AssignmentExprSyntax specifically.

Visiting PrecedenceGroupAssociativitySyntax specifically.

Visiting GenericRequirementListSyntax specifically.

Visiting ExpressionSegmentSyntax specifically.

Visiting MemberAccessExprSyntax specifically.

Visiting GenericArgumentClauseSyntax specifically.

Visiting SimpleStringLiteralSegmentListSyntax specifically.

Visiting IdentifierPatternSyntax specifically.

Visiting PrecedenceGroupAssignmentSyntax specifically.

Visiting BreakStmtSyntax specifically.

Visiting WhereClauseSyntax specifically.

Visiting MacroExpansionDeclSyntax specifically.

Visiting SimpleTypeSpecifierSyntax specifically.

Visiting BooleanLiteralExprSyntax specifically.

Visiting TypeAliasDeclSyntax specifically.

Visiting PatternBindingSyntax specifically.

Visiting ConventionAttributeArgumentsSyntax specifically.

Visiting AwaitExprSyntax specifically.

Visiting NilLiteralExprSyntax specifically.

Visiting ClosureCaptureClauseSyntax specifically.

Visiting ArrayTypeSyntax specifically.

Visiting IdentifierTypeSyntax specifically.

Visiting SwitchCaseItemSyntax specifically.

Visiting GenericArgumentListSyntax specifically.

Visiting MissingDeclSyntax specifically.

Visiting DiscardStmtSyntax specifically.

Visiting OptionalBindingConditionSyntax specifically.

Visiting CodeBlockItemSyntax specifically.

Visiting ClosureParameterListSyntax specifically.

Visiting DocumentationAttributeArgumentListSyntax specifically.

Visiting WhileStmtSyntax specifically.

Visiting AttributeListSyntax specifically.

Visiting DictionaryTypeSyntax specifically.

Visiting VersionComponentSyntax specifically.

Visiting SwitchCaseItemListSyntax specifically.

Visiting UnresolvedAsExprSyntax specifically.

Visiting ImplementsAttributeArgumentsSyntax specifically.

Visiting TuplePatternElementListSyntax specifically.

Visiting TypeInitializerClauseSyntax specifically.

Visiting ProtocolDeclSyntax specifically.

Visiting _CanImportExprSyntax specifically.

Visiting AvailabilityLabeledArgumentSyntax specifically.

Visiting EnumCaseElementListSyntax specifically.

Visiting UnexpectedNodesSyntax specifically.

Visiting TypeSpecifierListSyntax specifically.

Visiting EnumCaseParameterSyntax specifically.

Visiting SwitchExprSyntax specifically.

Visiting FunctionParameterSyntax specifically.

Visiting IntegerLiteralExprSyntax specifically.

Visiting VersionComponentListSyntax specifically.

Visiting AsExprSyntax specifically.

Visiting IsTypePatternSyntax specifically.

Visiting UnderscorePrivateAttributeArgumentsSyntax specifically.

Visiting DynamicReplacementAttributeArgumentsSyntax specifically.

Visiting ActorDeclSyntax specifically.

Visiting CatchItemListSyntax specifically.

Visiting SomeOrAnyTypeSyntax specifically.

Visiting DeclNameArgumentListSyntax specifically.

Visiting ArrayElementSyntax specifically.

Visiting ClosureShorthandParameterListSyntax specifically.

Visiting LabeledExprSyntax specifically.

Visiting ClosureCaptureListSyntax specifically.

Visiting MissingStmtSyntax specifically.

Visiting ExpressionPatternSyntax specifically.

Visiting PatternBindingListSyntax specifically.

Visiting PrecedenceGroupDeclSyntax specifically.

Visiting MacroDeclSyntax specifically.

Visiting PrimaryAssociatedTypeListSyntax specifically.

Visiting SpecializeAvailabilityArgumentSyntax specifically.

Visiting SpecializeAttributeArgumentListSyntax specifically.

Visiting PrecedenceGroupNameSyntax specifically.

Visiting OperatorDeclSyntax specifically.

Visiting MissingExprSyntax specifically.

Visiting SpecializeTargetFunctionArgumentSyntax specifically.

Visiting ConformanceRequirementSyntax specifically.

Visiting YieldedExpressionListSyntax specifically.

Visiting ExposeAttributeArgumentsSyntax specifically.

Visiting PackElementTypeSyntax specifically.

Visiting FunctionDeclSyntax specifically.

Visiting TokenSyntax specifically.

Visiting EnumCaseParameterClauseSyntax specifically.

Visiting ImportPathComponentListSyntax specifically.

Visiting LayoutRequirementSyntax specifically.

Visiting PostfixOperatorExprSyntax specifically.

Visiting EditorPlaceholderDeclSyntax specifically.

Visiting PackExpansionTypeSyntax specifically.

Visiting PrefixOperatorExprSyntax specifically.

Visiting GenericParameterClauseSyntax specifically.

Visiting DeferStmtSyntax specifically.

Visiting TupleExprSyntax specifically.

Visiting DocumentationAttributeArgumentSyntax specifically.

Visiting TupleTypeElementSyntax specifically.

Visiting ObjCSelectorPieceSyntax specifically.

Visiting ExprListSyntax specifically.

Visiting OpaqueReturnTypeOfAttributeArgumentsSyntax specifically.

Visiting ThrowStmtSyntax specifically.

Visiting ForceUnwrapExprSyntax specifically.

Visiting TypeExprSyntax specifically.

Visiting IfConfigClauseSyntax specifically.

Visiting ClosureParameterSyntax specifically.

Visiting DesignatedTypeListSyntax specifically.

Visiting AccessorEffectSpecifiersSyntax specifically.

Visiting DictionaryExprSyntax specifically.

Visiting IfConfigClauseListSyntax specifically.

Visiting TernaryExprSyntax specifically.

Visiting OriginallyDefinedInAttributeArgumentsSyntax specifically.

Visiting ClosureShorthandParameterSyntax specifically.

Visiting AccessorDeclListSyntax specifically.

Visiting NamedOpaqueReturnTypeSyntax specifically.

Visiting DeclModifierListSyntax specifically.

Visiting ClosureExprSyntax specifically.

Visiting ConditionElementSyntax specifically.

Visiting ForStmtSyntax specifically.

Visiting EnumCaseParameterListSyntax specifically.

Visiting MemberBlockItemSyntax specifically.

Visiting FunctionCallExprSyntax specifically.

Visiting TryExprSyntax specifically.

Visiting EnumDeclSyntax specifically.

Visiting BinaryOperatorExprSyntax specifically.

Visiting VariableDeclSyntax specifically.

Visiting FloatLiteralExprSyntax specifically.

Visiting ClosureCaptureSyntax specifically.

Visiting EffectsAttributeArgumentListSyntax specifically.

Visiting AvailabilityArgumentSyntax specifically.

Visiting CompositionTypeSyntax specifically.

Visiting ArrayExprSyntax specifically.

Visiting AttributedTypeSyntax specifically.

Visiting MemberBlockItemListSyntax specifically.

Visiting DesignatedTypeSyntax specifically.

Visiting AccessorParametersSyntax specifically.

Visiting DifferentiabilityArgumentsSyntax specifically.

Visiting AttributeSyntax specifically.

Visiting GenericSpecializationExprSyntax specifically.

Visiting PrecedenceGroupRelationSyntax specifically.

Visiting SuppressedTypeSyntax specifically.

Visiting KeyPathSubscriptComponentSyntax specifically.

Visiting PlatformVersionItemListSyntax specifically.

Visiting FallThroughStmtSyntax specifically.

Visiting IfConfigDeclSyntax specifically.

Visiting MemberBlockSyntax specifically.

Visiting OptionalChainingExprSyntax specifically.

Visiting StringLiteralExprSyntax specifically.

Visiting DeclReferenceExprSyntax specifically.

Visiting PackExpansionExprSyntax specifically.

Visiting WildcardPatternSyntax specifically.

Visiting DifferentiabilityArgumentSyntax specifically.

Visiting SourceFileSyntax specifically.

Visiting SameTypeRequirementSyntax specifically.

Visiting UnavailableFromAsyncAttributeArgumentsSyntax specifically.

Visiting KeyPathComponentSyntax specifically.

Visiting InheritanceClauseSyntax specifically.

Visiting GenericArgumentSyntax specifically.

Visiting CompositionTypeElementSyntax specifically.

Visiting StructDeclSyntax specifically.

Visiting AssociatedTypeDeclSyntax specifically.

Visiting DictionaryElementListSyntax specifically.

Visiting InitializerDeclSyntax specifically.

Visiting ContinueStmtSyntax specifically.

func visitPost(AvailabilityConditionSyntax)

The function called after visiting AvailabilityConditionSyntax and its descendants.

func visitPost(MatchingPatternConditionSyntax)

The function called after visiting MatchingPatternConditionSyntax and its descendants.

func visitPost(PackElementExprSyntax)

The function called after visiting PackElementExprSyntax and its descendants.

func visitPost(DoStmtSyntax)

The function called after visiting DoStmtSyntax and its descendants.

func visitPost(TupleTypeSyntax)

The function called after visiting TupleTypeSyntax and its descendants.

func visitPost(ConventionAttributeArgumentsSyntax)

The function called after visiting ConventionAttributeArgumentsSyntax and its descendants.

func visitPost(StringLiteralExprSyntax)

The function called after visiting StringLiteralExprSyntax and its descendants.

func visitPost(StringLiteralSegmentListSyntax)

The function called after visiting StringLiteralSegmentListSyntax and its descendants.

func visitPost(DictionaryExprSyntax)

The function called after visiting DictionaryExprSyntax and its descendants.

func visitPost(MissingSyntax)

The function called after visiting MissingSyntax and its descendants.

func visitPost(FunctionSignatureSyntax)

The function called after visiting FunctionSignatureSyntax and its descendants.

func visitPost(DifferentiabilityArgumentsSyntax)

The function called after visiting DifferentiabilityArgumentsSyntax and its descendants.

func visitPost(GenericParameterSyntax)

The function called after visiting GenericParameterSyntax and its descendants.

func visitPost(SimpleStringLiteralExprSyntax)

The function called after visiting SimpleStringLiteralExprSyntax and its descendants.

func visitPost(TypeSpecifierListSyntax)

The function called after visiting TypeSpecifierListSyntax and its descendants.

func visitPost(DeclNameArgumentSyntax)

The function called after visiting DeclNameArgumentSyntax and its descendants.

func visitPost(MissingStmtSyntax)

The function called after visiting MissingStmtSyntax and its descendants.

func visitPost(DeferStmtSyntax)

The function called after visiting DeferStmtSyntax and its descendants.

func visitPost(BooleanLiteralExprSyntax)

The function called after visiting BooleanLiteralExprSyntax and its descendants.

func visitPost(DerivativeAttributeArgumentsSyntax)

The function called after visiting DerivativeAttributeArgumentsSyntax and its descendants.

func visitPost(SourceFileSyntax)

The function called after visiting SourceFileSyntax and its descendants.

func visitPost(RegexLiteralExprSyntax)

The function called after visiting RegexLiteralExprSyntax and its descendants.

func visitPost(BackDeployedAttributeArgumentsSyntax)

The function called after visiting BackDeployedAttributeArgumentsSyntax and its descendants.

func visitPost(FunctionCallExprSyntax)

The function called after visiting FunctionCallExprSyntax and its descendants.

func visitPost(CatchClauseSyntax)

The function called after visiting CatchClauseSyntax and its descendants.

func visitPost(ConsumeExprSyntax)

The function called after visiting ConsumeExprSyntax and its descendants.

func visitPost(CompositionTypeElementSyntax)

The function called after visiting CompositionTypeElementSyntax and its descendants.

func visitPost(DeclModifierSyntax)

The function called after visiting DeclModifierSyntax and its descendants.

func visitPost(GenericArgumentClauseSyntax)

The function called after visiting GenericArgumentClauseSyntax and its descendants.

func visitPost(SwitchCaseListSyntax)

The function called after visiting SwitchCaseListSyntax and its descendants.

func visitPost(ClosureCaptureSpecifierSyntax)

The function called after visiting ClosureCaptureSpecifierSyntax and its descendants.

func visitPost(PostfixIfConfigExprSyntax)

The function called after visiting PostfixIfConfigExprSyntax and its descendants.

func visitPost(PrecedenceGroupDeclSyntax)

The function called after visiting PrecedenceGroupDeclSyntax and its descendants.

func visitPost(WhileStmtSyntax)

The function called after visiting WhileStmtSyntax and its descendants.

func visitPost(CatchItemSyntax)

The function called after visiting CatchItemSyntax and its descendants.

func visitPost(DynamicReplacementAttributeArgumentsSyntax)

The function called after visiting DynamicReplacementAttributeArgumentsSyntax and its descendants.

func visitPost(DeclNameArgumentListSyntax)

The function called after visiting DeclNameArgumentListSyntax and its descendants.

func visitPost(PatternBindingSyntax)

The function called after visiting PatternBindingSyntax and its descendants.

func visitPost(InitializerDeclSyntax)

The function called after visiting InitializerDeclSyntax and its descendants.

func visitPost(PrimaryAssociatedTypeListSyntax)

The function called after visiting PrimaryAssociatedTypeListSyntax and its descendants.

func visitPost(InitializerClauseSyntax)

The function called after visiting InitializerClauseSyntax and its descendants.

func visitPost(AvailabilityLabeledArgumentSyntax)

The function called after visiting AvailabilityLabeledArgumentSyntax and its descendants.

func visitPost(BinaryOperatorExprSyntax)

The function called after visiting BinaryOperatorExprSyntax and its descendants.

func visitPost(SwitchCaseSyntax)

The function called after visiting SwitchCaseSyntax and its descendants.

func visitPost(AwaitExprSyntax)

The function called after visiting AwaitExprSyntax and its descendants.

func visitPost(MemberBlockItemSyntax)

The function called after visiting MemberBlockItemSyntax and its descendants.

func visitPost(SwitchDefaultLabelSyntax)

The function called after visiting SwitchDefaultLabelSyntax and its descendants.

func visitPost(UnresolvedIsExprSyntax)

The function called after visiting UnresolvedIsExprSyntax and its descendants.

func visitPost(GenericArgumentListSyntax)

The function called after visiting GenericArgumentListSyntax and its descendants.

func visitPost(IfExprSyntax)

The function called after visiting IfExprSyntax and its descendants.

func visitPost(ReturnStmtSyntax)

The function called after visiting ReturnStmtSyntax and its descendants.

func visitPost(PostfixOperatorExprSyntax)

The function called after visiting PostfixOperatorExprSyntax and its descendants.

func visitPost(SubscriptDeclSyntax)

The function called after visiting SubscriptDeclSyntax and its descendants.

func visitPost(TypeInitializerClauseSyntax)

The function called after visiting TypeInitializerClauseSyntax and its descendants.

func visitPost(SimpleTypeSpecifierSyntax)

The function called after visiting SimpleTypeSpecifierSyntax and its descendants.

func visitPost(SameTypeRequirementSyntax)

The function called after visiting SameTypeRequirementSyntax and its descendants.

func visitPost(PrecedenceGroupAttributeListSyntax)

The function called after visiting PrecedenceGroupAttributeListSyntax and its descendants.

func visitPost(ForStmtSyntax)

The function called after visiting ForStmtSyntax and its descendants.

func visitPost(ClosureParameterListSyntax)

The function called after visiting ClosureParameterListSyntax and its descendants.

func visitPost(AvailabilityArgumentSyntax)

The function called after visiting AvailabilityArgumentSyntax and its descendants.

func visitPost(DifferentiabilityArgumentListSyntax)

The function called after visiting DifferentiabilityArgumentListSyntax and its descendants.

func visitPost(MacroExpansionDeclSyntax)

The function called after visiting MacroExpansionDeclSyntax and its descendants.

func visitPost(PlatformVersionItemListSyntax)

The function called after visiting PlatformVersionItemListSyntax and its descendants.

func visitPost(TryExprSyntax)

The function called after visiting TryExprSyntax and its descendants.

func visitPost(_CanImportVersionInfoSyntax)

The function called after visiting _CanImportVersionInfoSyntax and its descendants.

func visitPost(IdentifierPatternSyntax)

The function called after visiting IdentifierPatternSyntax and its descendants.

func visitPost(ArrayExprSyntax)

The function called after visiting ArrayExprSyntax and its descendants.

func visitPost(CatchItemListSyntax)

The function called after visiting CatchItemListSyntax and its descendants.

func visitPost(GenericSpecializationExprSyntax)

The function called after visiting GenericSpecializationExprSyntax and its descendants.

func visitPost(DifferentiabilityWithRespectToArgumentSyntax)

The function called after visiting DifferentiabilityWithRespectToArgumentSyntax and its descendants.

func visitPost(PatternExprSyntax)

The function called after visiting PatternExprSyntax and its descendants.

func visitPost(SuperExprSyntax)

The function called after visiting SuperExprSyntax and its descendants.

func visitPost(IdentifierTypeSyntax)

The function called after visiting IdentifierTypeSyntax and its descendants.

func visitPost(EnumCaseParameterClauseSyntax)

The function called after visiting EnumCaseParameterClauseSyntax and its descendants.

func visitPost(ExpressionPatternSyntax)

The function called after visiting ExpressionPatternSyntax and its descendants.

func visitPost(MemberBlockSyntax)

The function called after visiting MemberBlockSyntax and its descendants.

func visitPost(ArrayTypeSyntax)

The function called after visiting ArrayTypeSyntax and its descendants.

func visitPost(ImportPathComponentListSyntax)

The function called after visiting ImportPathComponentListSyntax and its descendants.

func visitPost(SwitchCaseLabelSyntax)

The function called after visiting SwitchCaseLabelSyntax and its descendants.

func visitPost(OperatorDeclSyntax)

The function called after visiting OperatorDeclSyntax and its descendants.

func visitPost(AttributeListSyntax)

The function called after visiting AttributeListSyntax and its descendants.

func visitPost(AssignmentExprSyntax)

The function called after visiting AssignmentExprSyntax and its descendants.

func visitPost(TernaryExprSyntax)

The function called after visiting TernaryExprSyntax and its descendants.

func visitPost(TypeExprSyntax)

The function called after visiting TypeExprSyntax and its descendants.

func visitPost(TuplePatternSyntax)

The function called after visiting TuplePatternSyntax and its descendants.

func visitPost(ClassRestrictionTypeSyntax)

The function called after visiting ClassRestrictionTypeSyntax and its descendants.

func visitPost(PrecedenceGroupRelationSyntax)

The function called after visiting PrecedenceGroupRelationSyntax and its descendants.

func visitPost(ContinueStmtSyntax)

The function called after visiting ContinueStmtSyntax and its descendants.

func visitPost(ExprListSyntax)

The function called after visiting ExprListSyntax and its descendants.

func visitPost(ConventionWitnessMethodAttributeArgumentsSyntax)

The function called after visiting ConventionWitnessMethodAttributeArgumentsSyntax and its descendants.

func visitPost(DictionaryTypeSyntax)

The function called after visiting DictionaryTypeSyntax and its descendants.

func visitPost(GenericArgumentSyntax)

The function called after visiting GenericArgumentSyntax and its descendants.

func visitPost(TuplePatternElementListSyntax)

The function called after visiting TuplePatternElementListSyntax and its descendants.

func visitPost(LayoutRequirementSyntax)

The function called after visiting LayoutRequirementSyntax and its descendants.

func visitPost(TypeEffectSpecifiersSyntax)

The function called after visiting TypeEffectSpecifiersSyntax and its descendants.

func visitPost(KeyPathOptionalComponentSyntax)

The function called after visiting KeyPathOptionalComponentSyntax and its descendants.

func visitPost(ConditionElementSyntax)

The function called after visiting ConditionElementSyntax and its descendants.

func visitPost(MultipleTrailingClosureElementSyntax)

The function called after visiting MultipleTrailingClosureElementSyntax and its descendants.

func visitPost(FunctionEffectSpecifiersSyntax)

The function called after visiting FunctionEffectSpecifiersSyntax and its descendants.

func visitPost(ConditionElementListSyntax)

The function called after visiting ConditionElementListSyntax and its descendants.

func visitPost(PoundSourceLocationArgumentsSyntax)

The function called after visiting PoundSourceLocationArgumentsSyntax and its descendants.

func visitPost(MissingDeclSyntax)

The function called after visiting MissingDeclSyntax and its descendants.

func visitPost(GenericWhereClauseSyntax)

The function called after visiting GenericWhereClauseSyntax and its descendants.

func visitPost(ForceUnwrapExprSyntax)

The function called after visiting ForceUnwrapExprSyntax and its descendants.

func visitPost(ClosureShorthandParameterListSyntax)

The function called after visiting ClosureShorthandParameterListSyntax and its descendants.

func visitPost(ReturnClauseSyntax)

The function called after visiting ReturnClauseSyntax and its descendants.

func visitPost(OptionalTypeSyntax)

The function called after visiting OptionalTypeSyntax and its descendants.

func visitPost(IsExprSyntax)

The function called after visiting IsExprSyntax and its descendants.

func visitPost(YieldedExpressionListSyntax)

The function called after visiting YieldedExpressionListSyntax and its descendants.

func visitPost(DiscardAssignmentExprSyntax)

The function called after visiting DiscardAssignmentExprSyntax and its descendants.

func visitPost(PrecedenceGroupNameSyntax)

The function called after visiting PrecedenceGroupNameSyntax and its descendants.

func visitPost(VersionTupleSyntax)

The function called after visiting VersionTupleSyntax and its descendants.

func visitPost(PrimaryAssociatedTypeClauseSyntax)

The function called after visiting PrimaryAssociatedTypeClauseSyntax and its descendants.

func visitPost(RepeatStmtSyntax)

The function called after visiting RepeatStmtSyntax and its descendants.

func visitPost(PrecedenceGroupAssignmentSyntax)

The function called after visiting PrecedenceGroupAssignmentSyntax and its descendants.

func visitPost(NilLiteralExprSyntax)

The function called after visiting NilLiteralExprSyntax and its descendants.

func visitPost(EnumDeclSyntax)

The function called after visiting EnumDeclSyntax and its descendants.

func visitPost(SuppressedTypeSyntax)

The function called after visiting SuppressedTypeSyntax and its descendants.

func visitPost(MissingTypeSyntax)

The function called after visiting MissingTypeSyntax and its descendants.

func visitPost(YieldStmtSyntax)

The function called after visiting YieldStmtSyntax and its descendants.

func visitPost(KeyPathExprSyntax)

The function called after visiting KeyPathExprSyntax and its descendants.

func visitPost(PackExpansionExprSyntax)

The function called after visiting PackExpansionExprSyntax and its descendants.

func visitPost(MacroDeclSyntax)

The function called after visiting MacroDeclSyntax and its descendants.

func visitPost(ProtocolDeclSyntax)

The function called after visiting ProtocolDeclSyntax and its descendants.

func visitPost(ArrayElementListSyntax)

The function called after visiting ArrayElementListSyntax and its descendants.

func visitPost(DeclReferenceExprSyntax)

The function called after visiting DeclReferenceExprSyntax and its descendants.

func visitPost(AccessorParametersSyntax)

The function called after visiting AccessorParametersSyntax and its descendants.

func visitPost(TuplePatternElementSyntax)

The function called after visiting TuplePatternElementSyntax and its descendants.

func visitPost(EnumCaseParameterSyntax)

The function called after visiting EnumCaseParameterSyntax and its descendants.

func visitPost(TypeAliasDeclSyntax)

The function called after visiting TypeAliasDeclSyntax and its descendants.

func visitPost(CompositionTypeElementListSyntax)

The function called after visiting CompositionTypeElementListSyntax and its descendants.

func visitPost(ArrayElementSyntax)

The function called after visiting ArrayElementSyntax and its descendants.

func visitPost(StructDeclSyntax)

The function called after visiting StructDeclSyntax and its descendants.

func visitPost(InheritedTypeSyntax)

The function called after visiting InheritedTypeSyntax and its descendants.

func visitPost(CompositionTypeSyntax)

The function called after visiting CompositionTypeSyntax and its descendants.

func visitPost(DeinitializerDeclSyntax)

The function called after visiting DeinitializerDeclSyntax and its descendants.

func visitPost(SubscriptCallExprSyntax)

The function called after visiting SubscriptCallExprSyntax and its descendants.

func visitPost(MemberTypeSyntax)

The function called after visiting MemberTypeSyntax and its descendants.

func visitPost(NamedOpaqueReturnTypeSyntax)

The function called after visiting NamedOpaqueReturnTypeSyntax and its descendants.

func visitPost(SwitchCaseItemListSyntax)

The function called after visiting SwitchCaseItemListSyntax and its descendants.

func visitPost(ClosureParameterClauseSyntax)

The function called after visiting ClosureParameterClauseSyntax and its descendants.

func visitPost(DeclNameArgumentsSyntax)

The function called after visiting DeclNameArgumentsSyntax and its descendants.

func visitPost(VersionComponentSyntax)

The function called after visiting VersionComponentSyntax and its descendants.

func visitPost(ClosureCaptureClauseSyntax)

The function called after visiting ClosureCaptureClauseSyntax and its descendants.

func visitPost(CodeBlockSyntax)

The function called after visiting CodeBlockSyntax and its descendants.

func visitPost(PlatformVersionItemSyntax)

The function called after visiting PlatformVersionItemSyntax and its descendants.

func visitPost(PlatformVersionSyntax)

The function called after visiting PlatformVersionSyntax and its descendants.

func visitPost(ClosureCaptureSyntax)

The function called after visiting ClosureCaptureSyntax and its descendants.

func visitPost(LabeledStmtSyntax)

The function called after visiting LabeledStmtSyntax and its descendants.

func visitPost(WhereClauseSyntax)

The function called after visiting WhereClauseSyntax and its descendants.

func visitPost(CodeBlockItemSyntax)

The function called after visiting CodeBlockItemSyntax and its descendants.

func visitPost(GuardStmtSyntax)

The function called after visiting GuardStmtSyntax and its descendants.

func visitPost(FloatLiteralExprSyntax)

The function called after visiting FloatLiteralExprSyntax and its descendants.

func visitPost(TokenSyntax)

The function called after visiting the node and its descendants.

func visitPost(ImportPathComponentSyntax)

The function called after visiting ImportPathComponentSyntax and its descendants.

func visitPost(PackExpansionTypeSyntax)

The function called after visiting PackExpansionTypeSyntax and its descendants.

func visitPost(ImportDeclSyntax)

The function called after visiting ImportDeclSyntax and its descendants.

func visitPost(EditorPlaceholderExprSyntax)

The function called after visiting EditorPlaceholderExprSyntax and its descendants.

func visitPost(UnresolvedAsExprSyntax)

The function called after visiting UnresolvedAsExprSyntax and its descendants.

func visitPost(InOutExprSyntax)

The function called after visiting InOutExprSyntax and its descendants.

func visitPost(GenericRequirementSyntax)

The function called after visiting GenericRequirementSyntax and its descendants.

func visitPost(MissingPatternSyntax)

The function called after visiting MissingPatternSyntax and its descendants.

func visitPost(SpecializeTargetFunctionArgumentSyntax)

The function called after visiting SpecializeTargetFunctionArgumentSyntax and its descendants.

func visitPost(InfixOperatorExprSyntax)

The function called after visiting InfixOperatorExprSyntax and its descendants.

func visitPost(OptionalChainingExprSyntax)

The function called after visiting OptionalChainingExprSyntax and its descendants.

func visitPost(OperatorPrecedenceAndTypesSyntax)

The function called after visiting OperatorPrecedenceAndTypesSyntax and its descendants.

func visitPost(ClosureShorthandParameterSyntax)

The function called after visiting ClosureShorthandParameterSyntax and its descendants.

func visitPost(KeyPathComponentListSyntax)

The function called after visiting KeyPathComponentListSyntax and its descendants.

func visitPost(AssociatedTypeDeclSyntax)

The function called after visiting AssociatedTypeDeclSyntax and its descendants.

func visitPost(BreakStmtSyntax)

The function called after visiting BreakStmtSyntax and its descendants.

func visitPost(GenericParameterClauseSyntax)

The function called after visiting GenericParameterClauseSyntax and its descendants.

func visitPost(ClosureSignatureSyntax)

The function called after visiting ClosureSignatureSyntax and its descendants.

func visitPost(UnderscorePrivateAttributeArgumentsSyntax)

The function called after visiting UnderscorePrivateAttributeArgumentsSyntax and its descendants.

func visitPost(ClosureParameterSyntax)

The function called after visiting ClosureParameterSyntax and its descendants.

func visitPost(DesignatedTypeListSyntax)

The function called after visiting DesignatedTypeListSyntax and its descendants.

func visitPost(MemberAccessExprSyntax)

The function called after visiting MemberAccessExprSyntax and its descendants.

func visitPost(AccessorDeclSyntax)

The function called after visiting AccessorDeclSyntax and its descendants.

func visitPost(StringSegmentSyntax)

The function called after visiting StringSegmentSyntax and its descendants.

func visitPost(SpecializeAvailabilityArgumentSyntax)

The function called after visiting SpecializeAvailabilityArgumentSyntax and its descendants.

func visitPost(AttributeSyntax)

The function called after visiting AttributeSyntax and its descendants.

func visitPost(EditorPlaceholderDeclSyntax)

The function called after visiting EditorPlaceholderDeclSyntax and its descendants.

func visitPost(MissingExprSyntax)

The function called after visiting MissingExprSyntax and its descendants.

func visitPost(TupleTypeElementSyntax)

The function called after visiting TupleTypeElementSyntax and its descendants.

func visitPost(KeyPathPropertyComponentSyntax)

The function called after visiting KeyPathPropertyComponentSyntax and its descendants.

func visitPost(InheritanceClauseSyntax)

The function called after visiting InheritanceClauseSyntax and its descendants.

func visitPost(FunctionParameterSyntax)

The function called after visiting FunctionParameterSyntax and its descendants.

func visitPost(VariableDeclSyntax)

The function called after visiting VariableDeclSyntax and its descendants.

func visitPost(IfConfigClauseListSyntax)

The function called after visiting IfConfigClauseListSyntax and its descendants.

func visitPost(GenericRequirementListSyntax)

The function called after visiting GenericRequirementListSyntax and its descendants.

func visitPost(ImplicitlyUnwrappedOptionalTypeSyntax)

The function called after visiting ImplicitlyUnwrappedOptionalTypeSyntax and its descendants.

func visitPost(ClosureCaptureListSyntax)

The function called after visiting ClosureCaptureListSyntax and its descendants.

func visitPost(DeinitializerEffectSpecifiersSyntax)

The function called after visiting DeinitializerEffectSpecifiersSyntax and its descendants.

func visitPost(AttributedTypeSyntax)

The function called after visiting AttributedTypeSyntax and its descendants.

func visitPost(InheritedTypeListSyntax)

The function called after visiting InheritedTypeListSyntax and its descendants.

func visitPost(AccessorBlockSyntax)

The function called after visiting AccessorBlockSyntax and its descendants.

func visitPost(CopyExprSyntax)

The function called after visiting CopyExprSyntax and its descendants.

func visitPost(ObjCSelectorPieceListSyntax)

The function called after visiting ObjCSelectorPieceListSyntax and its descendants.

func visitPost(ThrowsClauseSyntax)

The function called after visiting ThrowsClauseSyntax and its descendants.

func visitPost(TupleTypeElementListSyntax)

The function called after visiting TupleTypeElementListSyntax and its descendants.

func visitPost(EnumCaseElementListSyntax)

The function called after visiting EnumCaseElementListSyntax and its descendants.

func visitPost(ImplementsAttributeArgumentsSyntax)

The function called after visiting ImplementsAttributeArgumentsSyntax and its descendants.

func visitPost(PackElementTypeSyntax)

The function called after visiting PackElementTypeSyntax and its descendants.

func visitPost(FunctionParameterListSyntax)

The function called after visiting FunctionParameterListSyntax and its descendants.

func visitPost(ObjCSelectorPieceSyntax)

The function called after visiting ObjCSelectorPieceSyntax and its descendants.

func visitPost(DeclModifierDetailSyntax)

The function called after visiting DeclModifierDetailSyntax and its descendants.

func visitPost(DeclModifierListSyntax)

The function called after visiting DeclModifierListSyntax and its descendants.

func visitPost(UnexpectedNodesSyntax)

The function called after visiting UnexpectedNodesSyntax and its descendants.

func visitPost(ActorDeclSyntax)

The function called after visiting ActorDeclSyntax and its descendants.

func visitPost(EffectsAttributeArgumentListSyntax)

The function called after visiting EffectsAttributeArgumentListSyntax and its descendants.

func visitPost(WildcardPatternSyntax)

The function called after visiting WildcardPatternSyntax and its descendants.

func visitPost(KeyPathComponentSyntax)

The function called after visiting KeyPathComponentSyntax and its descendants.

func visitPost(AccessorDeclListSyntax)

The function called after visiting AccessorDeclListSyntax and its descendants.

func visitPost(SomeOrAnyTypeSyntax)

The function called after visiting SomeOrAnyTypeSyntax and its descendants.

func visitPost(FunctionTypeSyntax)

The function called after visiting FunctionTypeSyntax and its descendants.

func visitPost(EnumCaseElementSyntax)

The function called after visiting EnumCaseElementSyntax and its descendants.

func visitPost(ArrowExprSyntax)

The function called after visiting ArrowExprSyntax and its descendants.

func visitPost(DocumentationAttributeArgumentListSyntax)

The function called after visiting DocumentationAttributeArgumentListSyntax and its descendants.

func visitPost(MetatypeTypeSyntax)

The function called after visiting MetatypeTypeSyntax and its descendants.

func visitPost(IsTypePatternSyntax)

The function called after visiting IsTypePatternSyntax and its descendants.

func visitPost(GenericParameterListSyntax)

The function called after visiting GenericParameterListSyntax and its descendants.

func visitPost(_CanImportExprSyntax)

The function called after visiting _CanImportExprSyntax and its descendants.

func visitPost(DocumentationAttributeArgumentSyntax)

The function called after visiting DocumentationAttributeArgumentSyntax and its descendants.

func visitPost(ClosureExprSyntax)

The function called after visiting ClosureExprSyntax and its descendants.

func visitPost(LabeledExprListSyntax)

The function called after visiting LabeledExprListSyntax and its descendants.

func visitPost(TupleExprSyntax)

The function called after visiting TupleExprSyntax and its descendants.

func visitPost(LabeledSpecializeArgumentSyntax)

The function called after visiting LabeledSpecializeArgumentSyntax and its descendants.

func visitPost(DifferentiableAttributeArgumentsSyntax)

The function called after visiting DifferentiableAttributeArgumentsSyntax and its descendants.

func visitPost(OptionalBindingConditionSyntax)

The function called after visiting OptionalBindingConditionSyntax and its descendants.

func visitPost(SwitchCaseItemSyntax)

The function called after visiting SwitchCaseItemSyntax and its descendants.

func visitPost(IntegerLiteralExprSyntax)

The function called after visiting IntegerLiteralExprSyntax and its descendants.

func visitPost(IfConfigClauseSyntax)

The function called after visiting IfConfigClauseSyntax and its descendants.

func visitPost(VersionComponentListSyntax)

The function called after visiting VersionComponentListSyntax and its descendants.

func visitPost(ConformanceRequirementSyntax)

The function called after visiting ConformanceRequirementSyntax and its descendants.

func visitPost(SpecializeAttributeArgumentListSyntax)

The function called after visiting SpecializeAttributeArgumentListSyntax and its descendants.

func visitPost(SequenceExprSyntax)

The function called after visiting SequenceExprSyntax and its descendants.

func visitPost(EnumCaseDeclSyntax)

The function called after visiting EnumCaseDeclSyntax and its descendants.

func visitPost(BorrowExprSyntax)

The function called after visiting BorrowExprSyntax and its descendants.

func visitPost(ExtensionDeclSyntax)

The function called after visiting ExtensionDeclSyntax and its descendants.

func visitPost(UnavailableFromAsyncAttributeArgumentsSyntax)

The function called after visiting UnavailableFromAsyncAttributeArgumentsSyntax and its descendants.

func visitPost(KeyPathSubscriptComponentSyntax)

The function called after visiting KeyPathSubscriptComponentSyntax and its descendants.

func visitPost(MultipleTrailingClosureElementListSyntax)

The function called after visiting MultipleTrailingClosureElementListSyntax and its descendants.

func visitPost(SimpleStringLiteralSegmentListSyntax)

The function called after visiting SimpleStringLiteralSegmentListSyntax and its descendants.

func visitPost(AsExprSyntax)

The function called after visiting AsExprSyntax and its descendants.

func visitPost(EnumCaseParameterListSyntax)

The function called after visiting EnumCaseParameterListSyntax and its descendants.

func visitPost(FallThroughStmtSyntax)

The function called after visiting FallThroughStmtSyntax and its descendants.

func visitPost(PrecedenceGroupNameListSyntax)

The function called after visiting PrecedenceGroupNameListSyntax and its descendants.

func visitPost(OpaqueReturnTypeOfAttributeArgumentsSyntax)

The function called after visiting OpaqueReturnTypeOfAttributeArgumentsSyntax and its descendants.

func visitPost(AccessorEffectSpecifiersSyntax)

The function called after visiting AccessorEffectSpecifiersSyntax and its descendants.

func visitPost(PatternBindingListSyntax)

The function called after visiting PatternBindingListSyntax and its descendants.

func visitPost(ExpressionStmtSyntax)

The function called after visiting ExpressionStmtSyntax and its descendants.

func visitPost(FunctionDeclSyntax)

The function called after visiting FunctionDeclSyntax and its descendants.

func visitPost(ClassDeclSyntax)

The function called after visiting ClassDeclSyntax and its descendants.

func visitPost(AvailabilityArgumentListSyntax)

The function called after visiting AvailabilityArgumentListSyntax and its descendants.

func visitPost(ThrowStmtSyntax)

The function called after visiting ThrowStmtSyntax and its descendants.

func visitPost(CatchClauseListSyntax)

The function called after visiting CatchClauseListSyntax and its descendants.

func visitPost(UnresolvedTernaryExprSyntax)

The function called after visiting UnresolvedTernaryExprSyntax and its descendants.

func visitPost(YieldedExpressionsClauseSyntax)

The function called after visiting YieldedExpressionsClauseSyntax and its descendants.

func visitPost(IfConfigDeclSyntax)

The function called after visiting IfConfigDeclSyntax and its descendants.

func visitPost(DiscardStmtSyntax)

The function called after visiting DiscardStmtSyntax and its descendants.

func visitPost(SwitchExprSyntax)

The function called after visiting SwitchExprSyntax and its descendants.

func visitPost(DifferentiabilityArgumentSyntax)

The function called after visiting DifferentiabilityArgumentSyntax and its descendants.

func visitPost(PrimaryAssociatedTypeSyntax)

The function called after visiting PrimaryAssociatedTypeSyntax and its descendants.

func visitPost(OriginallyDefinedInAttributeArgumentsSyntax)

The function called after visiting OriginallyDefinedInAttributeArgumentsSyntax and its descendants.

func visitPost(MacroExpansionExprSyntax)

The function called after visiting MacroExpansionExprSyntax and its descendants.

func visitPost(TypeAnnotationSyntax)

The function called after visiting TypeAnnotationSyntax and its descendants.

func visitPost(FunctionParameterClauseSyntax)

The function called after visiting FunctionParameterClauseSyntax and its descendants.

func visitPost(DesignatedTypeSyntax)

The function called after visiting DesignatedTypeSyntax and its descendants.

func visitPost(ValueBindingPatternSyntax)

The function called after visiting ValueBindingPatternSyntax and its descendants.

func visitPost(LabeledExprSyntax)

The function called after visiting LabeledExprSyntax and its descendants.

func visitPost(ExpressionSegmentSyntax)

The function called after visiting ExpressionSegmentSyntax and its descendants.

func visitPost(PrefixOperatorExprSyntax)

The function called after visiting PrefixOperatorExprSyntax and its descendants.

func visitPost(MemberBlockItemListSyntax)

The function called after visiting MemberBlockItemListSyntax and its descendants.

func visitPost(PrecedenceGroupAssociativitySyntax)

The function called after visiting PrecedenceGroupAssociativitySyntax and its descendants.

func visitPost(DictionaryElementSyntax)

The function called after visiting DictionaryElementSyntax and its descendants.

func visitPost(DictionaryElementListSyntax)

The function called after visiting DictionaryElementListSyntax and its descendants.

func visitPost(CodeBlockItemListSyntax)

The function called after visiting CodeBlockItemListSyntax and its descendants.

func visitPost(PoundSourceLocationSyntax)

The function called after visiting PoundSourceLocationSyntax and its descendants.

func visitPost(ExposeAttributeArgumentsSyntax)

The function called after visiting ExposeAttributeArgumentsSyntax and its descendants.

func visitPost(YieldedExpressionSyntax)

The function called after visiting YieldedExpressionSyntax and its descendants.

func walk(some SyntaxProtocol)

Walk all nodes of the given syntax tree, calling the corresponding visit function for every node that is being visited.

Relationships

Inherited By

  • SyntaxAnyVisitor

See Also

Syntax Visitors

class SyntaxAnyVisitor

A SyntaxVisitor that can visit the nodes as generic Syntax values.

class SyntaxRewriter

/ Automatically generated by generate-swift-syntax / Do not edit directly!

enum SyntaxTreeViewMode

Specifies how missing and unexpected nodes should be handled when traversing a syntax tree.

enum SyntaxVisitorContinueKind

The enum describes how the SyntaxVisitor should continue after visiting the current node.

struct ReversedTokenSequence

Reverse sequence of tokens that are part of the provided Syntax node.

  • SyntaxVisitor
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SyntaxAnyVisitor

Class

SyntaxAnyVisitor

A SyntaxVisitor that can visit the nodes as generic Syntax values.

class SyntaxAnyVisitor

SyntaxAnyVisitor.swift

Overview

This subclass of SyntaxVisitor is slower than the type-specific visitation of SyntaxVisitor. Use SyntaxAnyVisitor if the visitAny(_) function would be useful to have, otherwise inherit from SyntaxVisitor.

This works by overriding the type-specific visit function that delegate to visitAny(_). A subclass that provides a custom type-specific visit function, should also call visitAny(_) in its implementation, if calling visitAny is needed:

struct MyVisitor: SyntaxAnyVisitor {

visitAny(token) } }

Topics

Instance Methods

func visitAnyPost(Syntax)

The function called after visiting the node and its descendants.

func visitPost(SpecializeAttributeArgumentListSyntax)

func visitPost(PrefixOperatorExprSyntax)

func visitPost(FallThroughStmtSyntax)

func visitPost(OperatorPrecedenceAndTypesSyntax)

func visitPost(PlatformVersionItemSyntax)

func visitPost(DeinitializerEffectSpecifiersSyntax)

func visitPost(ClosureCaptureSpecifierSyntax)

func visitPost(ClosureShorthandParameterListSyntax)

func visitPost(SwitchCaseSyntax)

func visitPost(SameTypeRequirementSyntax)

func visitPost(InitializerDeclSyntax)

func visitPost(ExpressionPatternSyntax)

func visitPost(ClassRestrictionTypeSyntax)

func visitPost(AvailabilityArgumentSyntax)

func visitPost(ImportPathComponentListSyntax)

func visitPost(EnumCaseDeclSyntax)

func visitPost(FunctionCallExprSyntax)

func visitPost(FloatLiteralExprSyntax)

func visitPost(MultipleTrailingClosureElementListSyntax)

func visitPost(FunctionParameterSyntax)

func visitPost(AccessorEffectSpecifiersSyntax)

func visitPost(PrecedenceGroupAttributeListSyntax)

func visitPost(GenericWhereClauseSyntax)

func visitPost(OptionalTypeSyntax)

func visitPost(TuplePatternSyntax)

func visitPost(InheritanceClauseSyntax)

func visitPost(DeclNameArgumentListSyntax)

func visitPost(ReturnClauseSyntax)

func visitPost(ContinueStmtSyntax)

func visitPost(ImplementsAttributeArgumentsSyntax)

func visitPost(FunctionTypeSyntax)

func visitPost(MissingExprSyntax)

func visitPost(EffectsAttributeArgumentListSyntax)

func visitPost(GenericArgumentSyntax)

func visitPost(ExprListSyntax)

func visitPost(DesignatedTypeSyntax)

func visitPost(StringSegmentSyntax)

func visitPost(IsTypePatternSyntax)

func visitPost(SuppressedTypeSyntax)

func visitPost(PostfixOperatorExprSyntax)

func visitPost(PoundSourceLocationArgumentsSyntax)

func visitPost(OptionalChainingExprSyntax)

func visitPost(ThrowStmtSyntax)

func visitPost(FunctionParameterListSyntax)

func visitPost(ClosureParameterListSyntax)

func visitPost(GenericRequirementListSyntax)

func visitPost(IsExprSyntax)

func visitPost(EnumCaseParameterListSyntax)

func visitPost(ArrayElementSyntax)

func visitPost(CodeBlockSyntax)

func visitPost(KeyPathOptionalComponentSyntax)

func visitPost(DifferentiabilityArgumentsSyntax)

func visitPost(FunctionParameterClauseSyntax)

func visitPost(CopyExprSyntax)

func visitPost(ObjCSelectorPieceSyntax)

func visitPost(SimpleTypeSpecifierSyntax)

func visitPost(ForStmtSyntax)

func visitPost(RepeatStmtSyntax)

func visitPost(PlatformVersionItemListSyntax)

func visitPost(SuperExprSyntax)

func visitPost(DeclReferenceExprSyntax)

func visitPost(WildcardPatternSyntax)

func visitPost(UnderscorePrivateAttributeArgumentsSyntax)

func visitPost(CatchClauseSyntax)

func visitPost(DictionaryTypeSyntax)

func visitPost(OriginallyDefinedInAttributeArgumentsSyntax)

func visitPost(NamedOpaqueReturnTypeSyntax)

func visitPost(TypeAliasDeclSyntax)

func visitPost(KeyPathExprSyntax)

func visitPost(AvailabilityLabeledArgumentSyntax)

func visitPost(PatternBindingListSyntax)

func visitPost(CatchItemListSyntax)

func visitPost(LabeledExprSyntax)

func visitPost(UnavailableFromAsyncAttributeArgumentsSyntax)

func visitPost(PackElementExprSyntax)

func visitPost(StringLiteralSegmentListSyntax)

func visitPost(BooleanLiteralExprSyntax)

func visitPost(UnexpectedNodesSyntax)

func visitPost(ArrayElementListSyntax)

func visitPost(ExposeAttributeArgumentsSyntax)

func visitPost(YieldedExpressionListSyntax)

func visitPost(VersionComponentListSyntax)

func visitPost(MacroExpansionDeclSyntax)

func visitPost(SequenceExprSyntax)

func visitPost(ExpressionSegmentSyntax)

func visitPost(InitializerClauseSyntax)

func visitPost(SwitchCaseItemSyntax)

func visitPost(CompositionTypeSyntax)

func visitPost(GenericParameterListSyntax)

func visitPost(BreakStmtSyntax)

func visitPost(RegexLiteralExprSyntax)

func visitPost(ArrayTypeSyntax)

func visitPost(TupleTypeElementSyntax)

func visitPost(UnresolvedIsExprSyntax)

func visitPost(OpaqueReturnTypeOfAttributeArgumentsSyntax)

func visitPost(PlatformVersionSyntax)

func visitPost(EditorPlaceholderExprSyntax)

func visitPost(DeclNameArgumentsSyntax)

func visitPost(SimpleStringLiteralSegmentListSyntax)

func visitPost(PrimaryAssociatedTypeClauseSyntax)

func visitPost(ReturnStmtSyntax)

func visitPost(TypeEffectSpecifiersSyntax)

func visitPost(_CanImportExprSyntax)

func visitPost(ArrowExprSyntax)

func visitPost(VariableDeclSyntax)

func visitPost(ClosureCaptureSyntax)

func visitPost(TypeSpecifierListSyntax)

func visitPost(TokenSyntax)

func visitPost(AccessorDeclSyntax)

func visitPost(ClosureExprSyntax)

func visitPost(ArrayExprSyntax)

func visitPost(DocumentationAttributeArgumentListSyntax)

func visitPost(GenericRequirementSyntax)

func visitPost(BackDeployedAttributeArgumentsSyntax)

func visitPost(DictionaryElementListSyntax)

func visitPost(MultipleTrailingClosureElementSyntax)

func visitPost(PatternBindingSyntax)

func visitPost(IfConfigDeclSyntax)

func visitPost(DeferStmtSyntax)

func visitPost(PrecedenceGroupRelationSyntax)

func visitPost(PostfixIfConfigExprSyntax)

func visitPost(ThrowsClauseSyntax)

func visitPost(WhereClauseSyntax)

func visitPost(MissingDeclSyntax)

func visitPost(YieldStmtSyntax)

func visitPost(ImportDeclSyntax)

func visitPost(AsExprSyntax)

func visitPost(BinaryOperatorExprSyntax)

func visitPost(DictionaryElementSyntax)

func visitPost(PrimaryAssociatedTypeSyntax)

func visitPost(ConventionWitnessMethodAttributeArgumentsSyntax)

func visitPost(CatchItemSyntax)

func visitPost(_CanImportVersionInfoSyntax)

func visitPost(LabeledSpecializeArgumentSyntax)

func visitPost(IntegerLiteralExprSyntax)

func visitPost(NilLiteralExprSyntax)

func visitPost(KeyPathSubscriptComponentSyntax)

func visitPost(InheritedTypeListSyntax)

func visitPost(UnresolvedTernaryExprSyntax)

func visitPost(SwitchExprSyntax)

func visitPost(DifferentiabilityArgumentSyntax)

func visitPost(TernaryExprSyntax)

func visitPost(FunctionEffectSpecifiersSyntax)

func visitPost(FunctionDeclSyntax)

func visitPost(IdentifierPatternSyntax)

func visitPost(IdentifierTypeSyntax)

func visitPost(CompositionTypeElementSyntax)

func visitPost(EnumCaseParameterClauseSyntax)

func visitPost(InfixOperatorExprSyntax)

func visitPost(MemberAccessExprSyntax)

func visitPost(GenericParameterSyntax)

func visitPost(MacroDeclSyntax)

func visitPost(AvailabilityConditionSyntax)

func visitPost(ConventionAttributeArgumentsSyntax)

func visitPost(PackExpansionExprSyntax)

func visitPost(ClosureSignatureSyntax)

func visitPost(AwaitExprSyntax)

func visitPost(DynamicReplacementAttributeArgumentsSyntax)

func visitPost(InOutExprSyntax)

func visitPost(ClassDeclSyntax)

func visitPost(TupleExprSyntax)

func visitPost(LayoutRequirementSyntax)

func visitPost(SourceFileSyntax)

func visitPost(SubscriptDeclSyntax)

func visitPost(ConformanceRequirementSyntax)

func visitPost(ForceUnwrapExprSyntax)

func visitPost(PrecedenceGroupNameSyntax)

func visitPost(AccessorDeclListSyntax)

func visitPost(SwitchDefaultLabelSyntax)

func visitPost(DeclModifierSyntax)

func visitPost(DerivativeAttributeArgumentsSyntax)

func visitPost(AccessorBlockSyntax)

func visitPost(ImportPathComponentSyntax)

func visitPost(MetatypeTypeSyntax)

func visitPost(PrecedenceGroupAssignmentSyntax)

func visitPost(TypeExprSyntax)

func visitPost(GenericParameterClauseSyntax)

func visitPost(ClosureParameterSyntax)

func visitPost(SwitchCaseListSyntax)

func visitPost(IfExprSyntax)

func visitPost(ClosureShorthandParameterSyntax)

func visitPost(StructDeclSyntax)

func visitPost(LabeledExprListSyntax)

func visitPost(MemberBlockItemListSyntax)

func visitPost(TryExprSyntax)

func visitPost(TupleTypeSyntax)

func visitPost(PrecedenceGroupAssociativitySyntax)

func visitPost(ClosureCaptureListSyntax)

func visitPost(StringLiteralExprSyntax)

func visitPost(MemberTypeSyntax)

func visitPost(DifferentiabilityWithRespectToArgumentSyntax)

func visitPost(IfConfigClauseSyntax)

func visitPost(TuplePatternElementListSyntax)

func visitPost(OperatorDeclSyntax)

func visitPost(AccessorParametersSyntax)

func visitPost(CodeBlockItemListSyntax)

func visitPost(VersionTupleSyntax)

func visitPost(CompositionTypeElementListSyntax)

func visitPost(ValueBindingPatternSyntax)

func visitPost(DeclModifierDetailSyntax)

func visitPost(GenericArgumentListSyntax)

func visitPost(GuardStmtSyntax)

func visitPost(DifferentiabilityArgumentListSyntax)

func visitPost(PrecedenceGroupDeclSyntax)

func visitPost(KeyPathPropertyComponentSyntax)

func visitPost(AttributedTypeSyntax)

func visitPost(FunctionSignatureSyntax)

func visitPost(EnumCaseElementSyntax)

func visitPost(PrimaryAssociatedTypeListSyntax)

func visitPost(ConsumeExprSyntax)

func visitPost(SwitchCaseLabelSyntax)

func visitPost(DiscardStmtSyntax)

func visitPost(MemberBlockSyntax)

func visitPost(AttributeListSyntax)

func visitPost(VersionComponentSyntax)

func visitPost(DesignatedTypeListSyntax)

func visitPost(MissingStmtSyntax)

func visitPost(PackExpansionTypeSyntax)

func visitPost(GenericSpecializationExprSyntax)

func visitPost(MissingPatternSyntax)

func visitPost(DictionaryExprSyntax)

func visitPost(SimpleStringLiteralExprSyntax)

func visitPost(TupleTypeElementListSyntax)

func visitPost(TypeAnnotationSyntax)

func visitPost(TypeInitializerClauseSyntax)

func visitPost(MacroExpansionExprSyntax)

func visitPost(ActorDeclSyntax)

func visitPost(AvailabilityArgumentListSyntax)

func visitPost(ClosureParameterClauseSyntax)

func visitPost(SubscriptCallExprSyntax)

func visitPost(InheritedTypeSyntax)

func visitPost(GenericArgumentClauseSyntax)

func visitPost(AttributeSyntax)

func visitPost(PrecedenceGroupNameListSyntax)

func visitPost(EnumCaseParameterSyntax)

func visitPost(OptionalBindingConditionSyntax)

func visitPost(CodeBlockItemSyntax)

func visitPost(EnumDeclSyntax)

func visitPost(DeinitializerDeclSyntax)

func visitPost(CatchClauseListSyntax)

func visitPost(IfConfigClauseListSyntax)

func visitPost(DoStmtSyntax)

func visitPost(MissingTypeSyntax)

func visitPost(AssignmentExprSyntax)

func visitPost(ConditionElementSyntax)

func visitPost(ConditionElementListSyntax)

func visitPost(ExpressionStmtSyntax)

func visitPost(ProtocolDeclSyntax)

func visitPost(DiscardAssignmentExprSyntax)

func visitPost(PatternExprSyntax)

func visitPost(KeyPathComponentSyntax)

func visitPost(EditorPlaceholderDeclSyntax)

func visitPost(YieldedExpressionSyntax)

func visitPost(PoundSourceLocationSyntax)

func visitPost(ClosureCaptureClauseSyntax)

func visitPost(ImplicitlyUnwrappedOptionalTypeSyntax)

func visitPost(SpecializeAvailabilityArgumentSyntax)

func visitPost(MissingSyntax)

func visitPost(LabeledStmtSyntax)

func visitPost(SpecializeTargetFunctionArgumentSyntax)

func visitPost(DeclModifierListSyntax)

func visitPost(DifferentiableAttributeArgumentsSyntax)

func visitPost(BorrowExprSyntax)

func visitPost(KeyPathComponentListSyntax)

func visitPost(UnresolvedAsExprSyntax)

func visitPost(AssociatedTypeDeclSyntax)

func visitPost(SwitchCaseItemListSyntax)

func visitPost(ObjCSelectorPieceListSyntax)

func visitPost(WhileStmtSyntax)

func visitPost(DeclNameArgumentSyntax)

func visitPost(SomeOrAnyTypeSyntax)

func visitPost(YieldedExpressionsClauseSyntax)

func visitPost(ExtensionDeclSyntax)

func visitPost(DocumentationAttributeArgumentSyntax)

func visitPost(MemberBlockItemSyntax)

func visitPost(MatchingPatternConditionSyntax)

func visitPost(PackElementTypeSyntax)

func visitPost(EnumCaseElementListSyntax)

func visitPost(TuplePatternElementSyntax)

Relationships

Inherits From

  • SyntaxVisitor

See Also

Syntax Visitors

class SyntaxVisitor

class SyntaxRewriter

/ Automatically generated by generate-swift-syntax / Do not edit directly!

enum SyntaxTreeViewMode

Specifies how missing and unexpected nodes should be handled when traversing a syntax tree.

enum SyntaxVisitorContinueKind

The enum describes how the SyntaxVisitor should continue after visiting the current node.

struct ReversedTokenSequence

Reverse sequence of tokens that are part of the provided Syntax node.

  • SyntaxAnyVisitor
  • Overview
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • Syntax

Structure

Syntax

A Syntax node represents a tree of nodes with tokens at the leaves. Each node has accessors for its known children, and allows efficient iteration over the children through its children property.

struct Syntax

Syntax.swift

Topics

Operators

Returns true if rhs and lhs have the same ID.

Initializers

init(some SyntaxProtocol)

Create a Syntax node from a specialized syntax node.

init?(fromProtocol: (any SyntaxProtocol)?)

Same as init(fromProtocol:) but returns nil if syntax is nil.

init(fromProtocol: any SyntaxProtocol)

Creates a new Syntax node from any node that conforms to SyntaxProtocol.

Instance Properties

var endPosition: AbsolutePosition

The end position of this node, including its trivia.

var endPositionBeforeTrailingTrivia: AbsolutePosition

The end position of this node’s content, before any trailing trivia.

var id: SyntaxIdentifier

var parent: Syntax?

var position: AbsolutePosition

The position of the start of this node’s leading trivia

var positionAfterSkippingLeadingTrivia: AbsolutePosition

The position of the start of this node’s content, skipping its trivia

var root: Syntax

var syntaxTextBytes: [UInt8]

Retrieve the syntax text as an array of bytes that models the input source even in the presence of invalid UTF-8.

Instance Methods

Get an enum that can be used to exhaustively switch over all syntax nodes.

Return the non-type erased version of this syntax node if it conforms to PatternSyntaxProtocol. Otherwise return nil.

Return the non-type erased version of this syntax node if it conforms to TypeSyntaxProtocol. Otherwise return nil.

Return the non-type erased version of this syntax node if it conforms to DeclSyntaxProtocol. Otherwise return nil.

Return the non-type erased version of this syntax node if it conforms to ExprSyntaxProtocol. Otherwise return nil.

Return the non-type erased version of this syntax node if it conforms to StmtSyntaxProtocol. Otherwise return nil.

Return the non-type erased version of this syntax node. Note that this will incur an existential conversion.

The ending location, in the provided file, of this Syntax node.

func hash(into: inout Hasher)

Add the hash value of this node’s ID to hasher.

Check whether the non-type erased version of this syntax node conforms to DeclSyntaxProtocol.

Check whether the non-type erased version of this syntax node conforms to StmtSyntaxProtocol.

Check whether the non-type erased version of this syntax node conforms to PatternSyntaxProtocol.

Syntax nodes always conform to SyntaxProtocol. This API is just added for consistency. Note that this will incur an existential conversion.

Deprecated

Check whether the non-type erased version of this syntax node conforms to ExprSyntaxProtocol.

Check whether the non-type erased version of this syntax node conforms to TypeSyntaxProtocol.

The source range, in the provided file, of this Syntax node.

The starting location, in the provided file, of this Syntax node.

Relationships

Conforms To

  • Swift.Copyable

  • Swift.CustomDebugStringConvertible

  • Swift.CustomReflectable

  • Swift.CustomStringConvertible

  • Swift.Equatable

  • Swift.Hashable

  • Swift.Identifiable

  • Swift.Sendable

  • Swift.TextOutputStreamable

  • SyntaxHashable

  • SyntaxProtocol

  • Syntax

  • Topics

  • Relationships

| |


  • SwiftSyntax
  • SyntaxRewriter

Class

SyntaxRewriter

/ Automatically generated by generate-swift-syntax / Do not edit directly!

class SyntaxRewriter

SyntaxRewriter.swift

Topics

Initializers

init(viewMode: SyntaxTreeViewMode)

Instance Properties

let viewMode: SyntaxTreeViewMode

Instance Methods

Rewrite node, keeping its parent unless detach is true.

Visit a MissingExprSyntax.

Visit a SuperExprSyntax.

Visit a AccessorDeclSyntax.

Visit a PrecedenceGroupNameSyntax.

Visit a AccessorParametersSyntax.

Visit a ArrayTypeSyntax.

Visit a UnresolvedIsExprSyntax.

Visit a MissingPatternSyntax.

Visit a TypeInitializerClauseSyntax.

Visit a CatchClauseSyntax.

Visit a UnavailableFromAsyncAttributeArgumentsSyntax.

Visit a KeyPathSubscriptComponentSyntax.

Visit a ForceUnwrapExprSyntax.

Visit a ArrayElementListSyntax.

Visit a TupleTypeElementListSyntax.

Visit a TryExprSyntax.

Visit a ExpressionStmtSyntax.

Visit a SwitchCaseSyntax.

Visit a SwitchCaseItemListSyntax.

Visit a InitializerClauseSyntax.

Visit a DifferentiabilityArgumentListSyntax.

Visit a TuplePatternElementListSyntax.

Visit any StmtSyntax node.

Visit a MemberAccessExprSyntax.

Visit a SpecializeAttributeArgumentListSyntax.

Visit a SuppressedTypeSyntax.

Visit a DeclReferenceExprSyntax.

Visit a IsTypePatternSyntax.

Visit a CatchItemListSyntax.

Visit a InheritedTypeListSyntax.

Visit a IntegerLiteralExprSyntax.

Visit a OptionalTypeSyntax.

Visit a IfExprSyntax.

Visit a NamedOpaqueReturnTypeSyntax.

Visit a DictionaryElementListSyntax.

Visit a AwaitExprSyntax.

Visit a GenericWhereClauseSyntax.

Visit a KeyPathPropertyComponentSyntax.

Visit a TupleTypeSyntax.

Visit a SimpleStringLiteralSegmentListSyntax.

Visit a GuardStmtSyntax.

Visit a _CanImportVersionInfoSyntax.

Visit a LabeledExprSyntax.

Visit a CopyExprSyntax.

Visit any TypeSyntax node.

Visit a FunctionEffectSpecifiersSyntax.

Visit a OperatorPrecedenceAndTypesSyntax.

Visit a AvailabilityConditionSyntax.

Visit a ClosureCaptureSyntax.

Visit a KeyPathComponentListSyntax.

Visit a SimpleStringLiteralExprSyntax.

Visit a WhileStmtSyntax.

Visit a ConformanceRequirementSyntax.

Visit a DocumentationAttributeArgumentSyntax.

Visit a KeyPathComponentSyntax.

Visit a SwitchCaseListSyntax.

Visit a GenericParameterClauseSyntax.

Visit a MemberBlockSyntax.

Visit a DiscardStmtSyntax.

Visit a EditorPlaceholderDeclSyntax.

Visit a DynamicReplacementAttributeArgumentsSyntax.

Visit a InitializerDeclSyntax.

Visit a MacroDeclSyntax.

Visit a TokenSyntax.

Visit a RepeatStmtSyntax.

Visit a TypeEffectSpecifiersSyntax.

Visit a MissingStmtSyntax.

Visit a SwitchCaseLabelSyntax.

Visit a ExprListSyntax.

Visit a OptionalChainingExprSyntax.

Visit a FunctionDeclSyntax.

Visit a SequenceExprSyntax.

Visit a UnresolvedTernaryExprSyntax.

Visit a ClassRestrictionTypeSyntax.

Visit a AsExprSyntax.

Visit a _CanImportExprSyntax.

Visit a InfixOperatorExprSyntax.

Visit a FallThroughStmtSyntax.

Visit a ConditionElementSyntax.

Visit a ImportPathComponentListSyntax.

Visit a ActorDeclSyntax.

Visit a ObjCSelectorPieceListSyntax.

Visit a PackExpansionTypeSyntax.

Visit a DictionaryTypeSyntax.

Visit a MissingTypeSyntax.

Visit a PatternBindingListSyntax.

Visit a AvailabilityArgumentListSyntax.

Visit a MatchingPatternConditionSyntax.

Visit a StringSegmentSyntax.

Visit a AccessorDeclListSyntax.

Visit a GenericSpecializationExprSyntax.

Visit a DeclModifierSyntax.

Visit a CatchItemSyntax.

Visit a AccessorEffectSpecifiersSyntax.

Visit a PackElementTypeSyntax.

Visit a IdentifierPatternSyntax.

Visit a ArrowExprSyntax.

Visit a ProtocolDeclSyntax.

Visit a ConventionWitnessMethodAttributeArgumentsSyntax.

Visit a LabeledStmtSyntax.

Visit a CompositionTypeSyntax.

Visit a ClosureCaptureListSyntax.

Visit a PatternBindingSyntax.

Visit a GenericArgumentClauseSyntax.

Visit a TypeExprSyntax.

Visit a VersionTupleSyntax.

Visit a YieldStmtSyntax.

Visit a ArrayExprSyntax.

Visit a SwitchExprSyntax.

Visit a FunctionCallExprSyntax.

Visit a EnumCaseParameterClauseSyntax.

Visit a PackExpansionExprSyntax.

Visit a AssociatedTypeDeclSyntax.

Visit a DifferentiabilityArgumentSyntax.

Visit a PrimaryAssociatedTypeClauseSyntax.

Visit a EnumDeclSyntax.

Visit a YieldedExpressionsClauseSyntax.

Visit a ClosureSignatureSyntax.

Visit a ReturnClauseSyntax.

Visit a ClosureParameterListSyntax.

Visit a PrecedenceGroupAssignmentSyntax.

Visit a ArrayElementSyntax.

Visit a EnumCaseParameterSyntax.

Visit a StructDeclSyntax.

Visit a DifferentiabilityArgumentsSyntax.

Visit a DeclModifierDetailSyntax.

Visit a BorrowExprSyntax.

Visit a ClosureShorthandParameterSyntax.

Visit a GenericParameterSyntax.

Visit a EnumCaseElementListSyntax.

Visit a FunctionTypeSyntax.

Visit a InheritanceClauseSyntax.

Visit a DeclNameArgumentsSyntax.

Visit a KeyPathExprSyntax.

Visit a YieldedExpressionListSyntax.

Visit a DiscardAssignmentExprSyntax.

Visit a ThrowsClauseSyntax.

Visit a LabeledSpecializeArgumentSyntax.

Visit a CodeBlockSyntax.

Visit a LayoutRequirementSyntax.

Visit a IdentifierTypeSyntax.

Visit a DifferentiableAttributeArgumentsSyntax.

Visit a MacroExpansionExprSyntax.

Visit a MetatypeTypeSyntax.

Visit a PoundSourceLocationArgumentsSyntax.

Visit a TypeAnnotationSyntax.

Visit a ImplementsAttributeArgumentsSyntax.

Visit a SomeOrAnyTypeSyntax.

Visit a InheritedTypeSyntax.

Visit a FunctionParameterListSyntax.

Visit a GenericArgumentSyntax.

Visit a PostfixIfConfigExprSyntax.

Visit a WildcardPatternSyntax.

Visit a DesignatedTypeListSyntax.

Visit a SimpleTypeSpecifierSyntax.

Visit a BooleanLiteralExprSyntax.

Visit a ConsumeExprSyntax.

Visit a ConventionAttributeArgumentsSyntax.

Visit a LabeledExprListSyntax.

Visit a AttributeSyntax.

Visit a AccessorBlockSyntax.

Visit a OpaqueReturnTypeOfAttributeArgumentsSyntax.

Visit a ExtensionDeclSyntax.

Visit a PrecedenceGroupAssociativitySyntax.

Visit a PrecedenceGroupNameListSyntax.

Visit a SameTypeRequirementSyntax.

Visit a FunctionSignatureSyntax.

Visit a SubscriptDeclSyntax.

Visit a VariableDeclSyntax.

Visit a CompositionTypeElementListSyntax.

Visit a ExpressionSegmentSyntax.

Visit a MissingDeclSyntax.

Visit a AssignmentExprSyntax.

Visit a MultipleTrailingClosureElementListSyntax.

Visit a PatternExprSyntax.

Visit a ImportDeclSyntax.

Visit a PrecedenceGroupRelationSyntax.

Visit a ClosureParameterSyntax.

Visit a UnexpectedNodesSyntax.

Visit a ThrowStmtSyntax.

Visit any ExprSyntax node.

Visit a MacroExpansionDeclSyntax.

Visit a DeclModifierListSyntax.

Visit a ClosureShorthandParameterListSyntax.

Visit a ImportPathComponentSyntax.

Visit a EffectsAttributeArgumentListSyntax.

Visit a DeinitializerEffectSpecifiersSyntax.

Visit a FunctionParameterSyntax.

Visit a VersionComponentSyntax.

Visit a ClassDeclSyntax.

Visit a CodeBlockItemSyntax.

Visit a DeinitializerDeclSyntax.

Visit a PoundSourceLocationSyntax.

Visit a TuplePatternSyntax.

Visit a ValueBindingPatternSyntax.

Visit a BreakStmtSyntax.

Visit a ClosureParameterClauseSyntax.

Visit a PackElementExprSyntax.

Visit a ConditionElementListSyntax.

Visit a AvailabilityLabeledArgumentSyntax.

Visit a DocumentationAttributeArgumentListSyntax.

Visit a DeferStmtSyntax.

Visit a ClosureCaptureSpecifierSyntax.

Visit a SubscriptCallExprSyntax.

Visit a SpecializeTargetFunctionArgumentSyntax.

Visit a KeyPathOptionalComponentSyntax.

Visit a ImplicitlyUnwrappedOptionalTypeSyntax.

Visit a ClosureExprSyntax.

Visit a BackDeployedAttributeArgumentsSyntax.

Visit a CatchClauseListSyntax.

Visit a GenericParameterListSyntax.

Visit a EnumCaseDeclSyntax.

Visit a TernaryExprSyntax.

Visit a AvailabilityArgumentSyntax.

Visit a MultipleTrailingClosureElementSyntax.

Visit a DesignatedTypeSyntax.

Visit a SpecializeAvailabilityArgumentSyntax.

Visit a PlatformVersionSyntax.

Visit a BinaryOperatorExprSyntax.

Visit a IfConfigDeclSyntax.

Visit a DictionaryExprSyntax.

Visit a SourceFileSyntax.

Visit a TypeSpecifierListSyntax.

Visit a MissingSyntax.

Visit a UnderscorePrivateAttributeArgumentsSyntax.

Visit any DeclSyntax node.

Visit a GenericArgumentListSyntax.

Visit a SwitchDefaultLabelSyntax.

Visit any Syntax node.

Deprecated

Visit a ClosureCaptureClauseSyntax.

Visit a TuplePatternElementSyntax.

Visit a GenericRequirementListSyntax.

Visit a MemberBlockItemSyntax.

Visit a PrefixOperatorExprSyntax.

Visit a ContinueStmtSyntax.

Visit a DoStmtSyntax.

Visit a CodeBlockItemListSyntax.

Visit a InOutExprSyntax.

Visit a PrimaryAssociatedTypeListSyntax.

Visit a AttributedTypeSyntax.

Visit a SwitchCaseItemSyntax.

Visit a ExpressionPatternSyntax.

Visit a TypeAliasDeclSyntax.

Visit a OperatorDeclSyntax.

Visit a WhereClauseSyntax.

Visit a DerivativeAttributeArgumentsSyntax.

Visit a TupleTypeElementSyntax.

Visit a DeclNameArgumentListSyntax.

Visit a MemberBlockItemListSyntax.

Visit a IfConfigClauseListSyntax.

Visit a ReturnStmtSyntax.

Visit a OptionalBindingConditionSyntax.

Visit a PrimaryAssociatedTypeSyntax.

Visit a MemberTypeSyntax.

Visit a RegexLiteralExprSyntax.

Visit a ForStmtSyntax.

Visit a AttributeListSyntax.

Visit a PrecedenceGroupAttributeListSyntax.

Visit a TupleExprSyntax.

Visit a StringLiteralExprSyntax.

Visit a DictionaryElementSyntax.

Visit a EditorPlaceholderExprSyntax.

Visit a GenericRequirementSyntax.

Visit a YieldedExpressionSyntax.

Visit a DeclNameArgumentSyntax.

Visit a NilLiteralExprSyntax.

Visit a ObjCSelectorPieceSyntax.

Visit a StringLiteralSegmentListSyntax.

Visit a PostfixOperatorExprSyntax.

Visit a OriginallyDefinedInAttributeArgumentsSyntax.

Visit a IsExprSyntax.

Visit a VersionComponentListSyntax.

Visit a EnumCaseParameterListSyntax.

Visit a EnumCaseElementSyntax.

Visit a FloatLiteralExprSyntax.

Visit a PrecedenceGroupDeclSyntax.

Visit a DifferentiabilityWithRespectToArgumentSyntax.

Visit a PlatformVersionItemSyntax.

Visit a UnresolvedAsExprSyntax.

Visit a CompositionTypeElementSyntax.

Visit a PlatformVersionItemListSyntax.

Visit a FunctionParameterClauseSyntax.

Visit a ExposeAttributeArgumentsSyntax.

Visit a IfConfigClauseSyntax.

Visit any PatternSyntax node.

Override point to choose custom visitation dispatch instead of the specialized visit(_:) methods. Use this instead of those methods if you intend to dynamically dispatch rewriting behavior.

func visitPost(Syntax)

The function called after visiting the node and its descendants.

func visitPre(Syntax)

The function called before visiting the node and its descendants.

See Also

Syntax Visitors

class SyntaxVisitor

class SyntaxAnyVisitor

A SyntaxVisitor that can visit the nodes as generic Syntax values.

enum SyntaxTreeViewMode

Specifies how missing and unexpected nodes should be handled when traversing a syntax tree.

enum SyntaxVisitorContinueKind

The enum describes how the SyntaxVisitor should continue after visiting the current node.

struct ReversedTokenSequence

Reverse sequence of tokens that are part of the provided Syntax node.

  • SyntaxRewriter
  • Topics
  • See Also

| |


  • SwiftSyntax
  • SyntaxTreeViewMode

Enumeration

SyntaxTreeViewMode

Specifies how missing and unexpected nodes should be handled when traversing a syntax tree.

enum SyntaxTreeViewMode

SyntaxTreeViewMode.swift

Topics

Enumeration Cases

case all

Both missing and unexpected nodes will be traversed.

case fixedUp

Views the syntax tree with fixes applied, that is missing nodes will be visited but unexpected nodes will be skipped. This views the tree in a way that’s closer to being syntactical correct and should be used for structural analysis of the syntax tree.

case sourceAccurate

Visit the tree in a way that reproduces the original source code. Missing nodes will not be visited, unexpected nodes will be visited. This mode is useful for source code transformations like a formatter.

Relationships

Conforms To

  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable

See Also

Syntax Visitors

class SyntaxVisitor

class SyntaxAnyVisitor

A SyntaxVisitor that can visit the nodes as generic Syntax values.

class SyntaxRewriter

/ Automatically generated by generate-swift-syntax / Do not edit directly!

enum SyntaxVisitorContinueKind

The enum describes how the SyntaxVisitor should continue after visiting the current node.

struct ReversedTokenSequence

Reverse sequence of tokens that are part of the provided Syntax node.

  • SyntaxTreeViewMode
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SyntaxVisitorContinueKind

Enumeration

SyntaxVisitorContinueKind

The enum describes how the SyntaxVisitor should continue after visiting the current node.

enum SyntaxVisitorContinueKind

SyntaxVisitor.swift

Topics

Enumeration Cases

case skipChildren

The visitor should avoid visiting the descendants of the current node.

case visitChildren

The visitor should visit the descendants of the current node.

Relationships

Conforms To

  • Swift.Equatable
  • Swift.Hashable

See Also

Syntax Visitors

class SyntaxVisitor

class SyntaxAnyVisitor

A SyntaxVisitor that can visit the nodes as generic Syntax values.

class SyntaxRewriter

/ Automatically generated by generate-swift-syntax / Do not edit directly!

enum SyntaxTreeViewMode

Specifies how missing and unexpected nodes should be handled when traversing a syntax tree.

struct ReversedTokenSequence

Reverse sequence of tokens that are part of the provided Syntax node.

  • SyntaxVisitorContinueKind
  • Topics
  • Relationships
  • See Also

| |



  • SwiftSyntax
  • DeclSyntax

Structure

DeclSyntax

struct DeclSyntax

SyntaxBaseNodes.swift

Subtypes

  • AccessorDeclSyntax

  • ActorDeclSyntax

  • AssociatedTypeDeclSyntax

  • ClassDeclSyntax

  • DeinitializerDeclSyntax

  • EditorPlaceholderDeclSyntax

  • EnumCaseDeclSyntax

  • EnumDeclSyntax

  • ExtensionDeclSyntax

  • FunctionDeclSyntax

  • IfConfigDeclSyntax

  • ImportDeclSyntax

  • InitializerDeclSyntax

  • MacroDeclSyntax

  • MacroExpansionDeclSyntax

  • MissingDeclSyntax

  • OperatorDeclSyntax

  • PoundSourceLocationSyntax

  • PrecedenceGroupDeclSyntax

  • ProtocolDeclSyntax

  • StructDeclSyntax

  • SubscriptDeclSyntax

  • TypeAliasDeclSyntax

  • VariableDeclSyntax

Topics

Initializers

init?((some DeclSyntaxProtocol)?)

Create a DeclSyntax node from a specialized optional syntax node.

init?(some SyntaxProtocol)

init(some DeclSyntaxProtocol)

Create a DeclSyntax node from a specialized syntax node.

init?(fromProtocol: (any DeclSyntaxProtocol)?)

init(fromProtocol: any DeclSyntaxProtocol)

Instance Methods

Get an enum that can be used to exhaustively switch over all Decl syntax nodes.

Return the non-type erased version of this syntax node.

Syntax nodes always conform to DeclSyntaxProtocol. This API is just added for consistency.

Deprecated

Type Properties

static var structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Declarations

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • DeclSyntax
  • Subtypes
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DeclSyntaxProtocol

Protocol

DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

protocol DeclSyntaxProtocol : SyntaxProtocol

SyntaxBaseNodes.swift

Overview

Extension point to add common methods to all DeclSyntax nodes.

Topics

Instance Methods

Attempts to upcast the current syntax node to its base node type ( DeclSyntax).

Deprecated

Attempts to cast the current syntax node to a given node type from the a base node protocol hierarchy other than DeclSyntaxProtocol.

Attempts to cast the current syntax node to a given specialized syntax type.

Force-casts the current syntax node to a given node type from a base node protocol hierarchy other than DeclSyntaxProtocol.

Force-casts the current syntax node to a given specialized syntax type.

Force-upcast the current syntax node to its base node type ( DeclSyntax).

Checks if the current syntax node can be cast to a given specialized syntax type.

Checks if the current syntax node can be upcast to its base node type ( DeclSyntax).

Checks if the current syntax node can be cast to a given node type from a base node protocol hierarchy other than DeclSyntaxProtocol.

Relationships

Inherits From

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxProtocol

Inherited By

  • DeclGroupSyntax

Conforming Types

  • AccessorDeclSyntax
  • ActorDeclSyntax
  • AssociatedTypeDeclSyntax
  • ClassDeclSyntax
  • DeclSyntax
  • DeinitializerDeclSyntax
  • EditorPlaceholderDeclSyntax
  • EnumCaseDeclSyntax
  • EnumDeclSyntax
  • ExtensionDeclSyntax
  • FunctionDeclSyntax
  • IfConfigDeclSyntax
  • ImportDeclSyntax
  • InitializerDeclSyntax
  • MacroDeclSyntax
  • MacroExpansionDeclSyntax
  • MissingDeclSyntax
  • OperatorDeclSyntax
  • PoundSourceLocationSyntax
  • PrecedenceGroupDeclSyntax
  • ProtocolDeclSyntax
  • StructDeclSyntax
  • SubscriptDeclSyntax
  • TypeAliasDeclSyntax
  • VariableDeclSyntax

See Also

Declarations

struct DeclSyntax

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • DeclSyntaxProtocol
  • Overview
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • MissingDeclSyntax

Structure

MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct MissingDeclSyntax

SyntaxNodesJKLMN.swift

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(attributes: AttributeListSyntax, modifiers: DeclModifierListSyntax, arena: SyntaxArena)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, placeholder: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

If there were standalone attributes without a declaration to attach them to, the MissingDeclSyntax will contain these.

var modifiers: DeclModifierListSyntax

If there were standalone modifiers without a declaration to attach them to, the MissingDeclSyntax will contain these.

var placeholder: TokenSyntax

var unexpectedAfterPlaceholder: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndPlaceholder: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • MissingNodeSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • MissingDeclSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AccessorDeclSyntax

Structure

AccessorDeclSyntax

struct AccessorDeclSyntax

SyntaxNodesAB.swift

Children

  • attributes: AttributeListSyntax

  • modifier: DeclModifierSyntax?

  • accessorSpecifier: ( get | set | didSet | willSet | unsafeAddress | addressWithOwner | addressWithNativeOwner | unsafeMutableAddress | mutableAddressWithOwner | mutableAddressWithNativeOwner | _read | read | _modify | modify | init)

  • parameters: AccessorParametersSyntax?

  • effectSpecifiers: AccessorEffectSpecifiersSyntax?

  • body: CodeBlockSyntax?

Contained in

  • AccessorDeclListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifier: DeclModifierSyntax?, UnexpectedNodesSyntax?, accessorKind: TokenSyntax, UnexpectedNodesSyntax?, parameter: AccessorParametersSyntax?, UnexpectedNodesSyntax?, effectSpecifiers: AccessorEffectSpecifiersSyntax?, UnexpectedNodesSyntax?, body: CodeBlockSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifier: DeclModifierSyntax?, UnexpectedNodesSyntax?, accessorSpecifier: TokenSyntax, UnexpectedNodesSyntax?, parameters: AccessorParametersSyntax?, UnexpectedNodesSyntax?, effectSpecifiers: AccessorEffectSpecifiersSyntax?, UnexpectedNodesSyntax?, body: CodeBlockSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var accessorKind: TokenSyntax Deprecated

var accessorSpecifier: TokenSyntax

var attributes: AttributeListSyntax

var body: CodeBlockSyntax?

var effectSpecifiers: AccessorEffectSpecifiersSyntax?

var modifier: DeclModifierSyntax?

var parameter: AccessorParametersSyntax? Deprecated

var parameters: AccessorParametersSyntax?

var unexpectedAfterBody: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAccessorKindAndParameter: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenAccessorSpecifierAndParameters: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifier: UnexpectedNodesSyntax?

var unexpectedBetweenEffectSpecifiersAndBody: UnexpectedNodesSyntax?

var unexpectedBetweenModifierAndAccessorKind: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenModifierAndAccessorSpecifier: UnexpectedNodesSyntax?

var unexpectedBetweenParameterAndEffectSpecifiers: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenParametersAndEffectSpecifiers: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithOptionalCodeBlockSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • AccessorDeclSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ActorDeclSyntax

Structure

ActorDeclSyntax

struct ActorDeclSyntax

SyntaxNodesAB.swift

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • actorKeyword: actor

  • genericParameterClause: GenericParameterClauseSyntax?

  • inheritanceClause: InheritanceClauseSyntax?

  • genericWhereClause: GenericWhereClauseSyntax?

  • memberBlock: MemberBlockSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, actorKeyword: TokenSyntax, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, memberBlock: MemberBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, actorKeyword: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, memberBlock: MemberBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var actorKeyword: TokenSyntax

The actor keyword.

var attributes: AttributeListSyntax

var genericParameterClause: GenericParameterClauseSyntax?

The parameter clause that defines the generic parameters.

var genericWhereClause: GenericWhereClauseSyntax?

A where clause that places additional constraints on generic parameters like where Element: Hashable.

var identifier: TokenSyntax Deprecated

var inheritanceClause: InheritanceClauseSyntax?

var memberBlock: MemberBlockSyntax

var modifiers: DeclModifierListSyntax

Modifiers like public that are attached to the actor declaration.

var name: TokenSyntax

The name of the actor. If the name matches a reserved keyword use backticks to escape it.

var unexpectedAfterMemberBlock: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenActorKeywordAndIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenActorKeywordAndName: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenGenericParameterClauseAndInheritanceClause: UnexpectedNodesSyntax?

var unexpectedBetweenGenericWhereClauseAndMemberBlock: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndGenericParameterClause: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenInheritanceClauseAndGenericWhereClause: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndActorKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndGenericParameterClause: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclGroupSyntax
  • DeclSyntaxProtocol
  • NamedDeclSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithGenericParametersSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • ActorDeclSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AssociatedTypeDeclSyntax

Structure

AssociatedTypeDeclSyntax

An associatedtype declaration

struct AssociatedTypeDeclSyntax

SyntaxNodesAB.swift

Overview

An example of an associatedtype declaration is

associatedtype Item

An associated type declaration may contain a type initializer clause which represents a default type assignment for the associated type.

associatedtype Item = Int

An associated type declaration may be declared with an inheritance clause which specifies the required conformances.

associatedtype Iterator: IteratorProtocol

A generic where clause may be present, here is an example which shows an associated type containing an inheritance clauses and a generic where clause.

associatedtype Iterator: IteratorProtocol where Iterator.Element == Item

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • associatedtypeKeyword: associatedtype

  • inheritanceClause: InheritanceClauseSyntax?

  • initializer: TypeInitializerClauseSyntax?

  • genericWhereClause: GenericWhereClauseSyntax?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, associatedtypeKeyword: TokenSyntax, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, initializer: TypeInitializerClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, associatedtypeKeyword: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, initializer: TypeInitializerClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var associatedtypeKeyword: TokenSyntax

The associatedtype keyword for this declaration.

var attributes: AttributeListSyntax

Attributes attached to the associated type declaration.

var genericWhereClause: GenericWhereClauseSyntax?

The where clause that applies to the generic parameters of this associated type declaration.

var identifier: TokenSyntax Deprecated

var inheritanceClause: InheritanceClauseSyntax?

The inheritance clause describing conformances for this associated type declaration.

var initializer: TypeInitializerClauseSyntax?

The type initializer clause for this associated type declaration which represents a default type assignment for the associated type.

var modifiers: DeclModifierListSyntax

Modifiers like public that are attached to the associated type declaration.

var name: TokenSyntax

The name of this associated type.

var unexpectedAfterGenericWhereClause: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAssociatedtypeKeywordAndIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenAssociatedtypeKeywordAndName: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndInheritanceClause: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenInheritanceClauseAndInitializer: UnexpectedNodesSyntax?

var unexpectedBetweenInitializerAndGenericWhereClause: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndAssociatedtypeKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndInheritanceClause: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • NamedDeclSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • AssociatedTypeDeclSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ClassDeclSyntax

Structure

ClassDeclSyntax

A class declaration

struct ClassDeclSyntax

SyntaxNodesC.swift

Overview

An example of a class declaration is

class SomeClass { let someMember: String

init(someMember: String) { self.someMember = someMember }

func foo() { print(someMember) }

return 1 } }

A class declaration may be declared without any members.

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • classKeyword: class

  • genericParameterClause: GenericParameterClauseSyntax?

  • inheritanceClause: InheritanceClauseSyntax?

  • genericWhereClause: GenericWhereClauseSyntax?

  • memberBlock: MemberBlockSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, classKeyword: TokenSyntax, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, memberBlock: MemberBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, classKeyword: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, memberBlock: MemberBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

Attributes attached to the class declaration, such as an @available attribute.

var classKeyword: TokenSyntax

The class keyword for this declaration.

var genericParameterClause: GenericParameterClauseSyntax?

The generic parameters, if any, of the class declaration.

var genericWhereClause: GenericWhereClauseSyntax?

The where clause that applies to the generic parameters of this class declaration.

var identifier: TokenSyntax Deprecated

var inheritanceClause: InheritanceClauseSyntax?

The inheritance clause describing one or more conformances for this class declaration.

var memberBlock: MemberBlockSyntax

The members of the class declaration. As class extension declarations may declare additional members, the contents of this member block isn’t guaranteed to be a complete list of members for this type.

var modifiers: DeclModifierListSyntax

Modifiers like public that are attached to the class declaration.

var name: TokenSyntax

The name of the class.

var unexpectedAfterMemberBlock: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenClassKeywordAndIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenClassKeywordAndName: UnexpectedNodesSyntax?

var unexpectedBetweenGenericParameterClauseAndInheritanceClause: UnexpectedNodesSyntax?

var unexpectedBetweenGenericWhereClauseAndMemberBlock: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndGenericParameterClause: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenInheritanceClauseAndGenericWhereClause: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndClassKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndGenericParameterClause: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclGroupSyntax
  • DeclSyntaxProtocol
  • NamedDeclSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithGenericParametersSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • ClassDeclSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DeinitializerDeclSyntax

Structure

DeinitializerDeclSyntax

A deinit declaration

struct DeinitializerDeclSyntax

SyntaxNodesD.swift

Overview

An example of a deinitializer is

deinit { }

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • deinitKeyword: deinit

  • effectSpecifiers: DeinitializerEffectSpecifiersSyntax?

  • body: CodeBlockSyntax?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, deinitKeyword: TokenSyntax, UnexpectedNodesSyntax?, effectSpecifiers: DeinitializerEffectSpecifiersSyntax?, UnexpectedNodesSyntax?, body: CodeBlockSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

Attributes that are attached to the deinitializer.

var body: CodeBlockSyntax?

The deinitializer’s body.

var deinitKeyword: TokenSyntax

The deinit keyword.

var effectSpecifiers: DeinitializerEffectSpecifiersSyntax?

var modifiers: DeclModifierListSyntax

Modifiers like public that are attached to the deinitializer.

var unexpectedAfterBody: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenDeinitKeywordAndEffectSpecifiers: UnexpectedNodesSyntax?

var unexpectedBetweenEffectSpecifiersAndBody: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndDeinitKeyword: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax
  • WithOptionalCodeBlockSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • DeinitializerDeclSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |



  • SwiftSyntax
  • EnumCaseDeclSyntax

Structure

EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumCaseDeclSyntax

SyntaxNodesEF.swift

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • caseKeyword: case

  • elements: EnumCaseElementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, caseKeyword: TokenSyntax, UnexpectedNodesSyntax?, elements: EnumCaseElementListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

The attributes applied to the case declaration.

var caseKeyword: TokenSyntax

The case keyword for this case.

var elements: EnumCaseElementListSyntax

The elements this case declares.

var modifiers: DeclModifierListSyntax

The declaration modifiers applied to the case declaration.

var unexpectedAfterElements: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenCaseKeywordAndElements: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndCaseKeyword: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s elements collection.

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • EnumCaseDeclSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |




  • SwiftSyntax
  • FunctionDeclSyntax

Structure

FunctionDeclSyntax

A Swift func declaration.

struct FunctionDeclSyntax

SyntaxNodesEF.swift

Example

A func declaration may be declared without any parameter.

func foo() {

}

A func declaration with multiple parameters.

func bar(_ arg1: Int, _ arg2: Int) {

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • funcKeyword: func

  • genericParameterClause: GenericParameterClauseSyntax?

  • signature: FunctionSignatureSyntax

  • genericWhereClause: GenericWhereClauseSyntax?

  • body: CodeBlockSyntax?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, funcKeyword: TokenSyntax, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, signature: FunctionSignatureSyntax, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, body: CodeBlockSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, funcKeyword: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, signature: FunctionSignatureSyntax, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, body: CodeBlockSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

Attributes that are attached to the function declaration.

var body: CodeBlockSyntax?

The function’s body.

var funcKeyword: TokenSyntax

The func keyword.

var genericParameterClause: GenericParameterClauseSyntax?

The parameter clause that defines the generic parameters.

var genericWhereClause: GenericWhereClauseSyntax?

A where clause that places additional constraints on generic parameters like where Element: Hashable.

var identifier: TokenSyntax Deprecated

var modifiers: DeclModifierListSyntax

Modifiers like public that are attached to the function declaration.

var name: TokenSyntax

The name of the function. If the name matches a reserved keyword use backticks to escape it.

var signature: FunctionSignatureSyntax

A function signature that defines the interface of the function.

var unexpectedAfterBody: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenFuncKeywordAndIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenFuncKeywordAndName: UnexpectedNodesSyntax?

var unexpectedBetweenGenericParameterClauseAndSignature: UnexpectedNodesSyntax?

var unexpectedBetweenGenericWhereClauseAndBody: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndGenericParameterClause: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenModifiersAndFuncKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndGenericParameterClause: UnexpectedNodesSyntax?

var unexpectedBetweenSignatureAndGenericWhereClause: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • NamedDeclSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithGenericParametersSyntax
  • WithModifiersSyntax
  • WithOptionalCodeBlockSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • FunctionDeclSyntax
  • Example
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • IfConfigDeclSyntax

Structure

IfConfigDeclSyntax

struct IfConfigDeclSyntax

SyntaxNodesGHI.swift

Children

  • clauses: IfConfigClauseListSyntax

  • poundEndif: #endif

Contained in

  • AttributeListSyntax

  • PostfixIfConfigExprSyntax. config

  • SwitchCaseListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, clauses: IfConfigClauseListSyntax, UnexpectedNodesSyntax?, poundEndif: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var clauses: IfConfigClauseListSyntax

var poundEndif: TokenSyntax

var unexpectedAfterPoundEndif: UnexpectedNodesSyntax?

var unexpectedBeforeClauses: UnexpectedNodesSyntax?

var unexpectedBetweenClausesAndPoundEndif: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s clauses collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct ImportDeclSyntax

An import declaration

struct InitializerDeclSyntax

An init declaration

  • IfConfigDeclSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ImportDeclSyntax

Structure

ImportDeclSyntax

An import declaration

struct ImportDeclSyntax

SyntaxNodesGHI.swift

Overview

An example of an import declaration is

import Foundation

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • importKeyword: import

  • importKindSpecifier: ( typealias | struct | class | enum | protocol | var | let | func | inout)?

  • path: ImportPathComponentListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, importKeyword: TokenSyntax, UnexpectedNodesSyntax?, importKindSpecifier: TokenSyntax?, UnexpectedNodesSyntax?, path: ImportPathComponentListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, importTok: TokenSyntax, UnexpectedNodesSyntax?, importKind: TokenSyntax?, UnexpectedNodesSyntax?, path: ImportPathComponentListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var attributes: AttributeListSyntax

Attributes attached to the import declaration, for example @testable.

var importKeyword: TokenSyntax

The import keyword for this declaration.

var importKind: TokenSyntax? Deprecated

var importKindSpecifier: TokenSyntax?

The kind of declaration being imported.

var importTok: TokenSyntax Deprecated

var modifiers: DeclModifierListSyntax

Modifiers that are attached to the import declaration. Currently, no modifiers are supported by Swift.

var path: ImportPathComponentListSyntax

The path to the module, submodule or symbol being imported.

var unexpectedAfterPath: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenImportKeywordAndImportKindSpecifier: UnexpectedNodesSyntax?

var unexpectedBetweenImportKindAndPath: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenImportKindSpecifierAndPath: UnexpectedNodesSyntax?

var unexpectedBetweenImportTokAndImportKind: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenModifiersAndImportKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndImportTok: UnexpectedNodesSyntax? Deprecated

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Adds the provided element to the node’s path collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct InitializerDeclSyntax

An init declaration

  • ImportDeclSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |





  • SwiftSyntax
  • OperatorDeclSyntax

Structure

OperatorDeclSyntax

A Swift operator declaration.

struct OperatorDeclSyntax

SyntaxNodesOP.swift

Children

  • fixitySpecifier: ( prefix | postfix | infix)

  • operatorKeyword: operator

  • operatorPrecedenceAndTypes: OperatorPrecedenceAndTypesSyntax?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, fixity: TokenSyntax, UnexpectedNodesSyntax?, operatorKeyword: TokenSyntax, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, operatorPrecedenceAndTypes: OperatorPrecedenceAndTypesSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, fixitySpecifier: TokenSyntax, UnexpectedNodesSyntax?, operatorKeyword: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, operatorPrecedenceAndTypes: OperatorPrecedenceAndTypesSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var fixity: TokenSyntax Deprecated

var fixitySpecifier: TokenSyntax

The fixity applied to the ‘operator’ declaration.

var identifier: TokenSyntax Deprecated

var name: TokenSyntax

var operatorKeyword: TokenSyntax

var operatorPrecedenceAndTypes: OperatorPrecedenceAndTypesSyntax?

Optionally specify a precedence group and designated types.

var unexpectedAfterOperatorPrecedenceAndTypes: UnexpectedNodesSyntax?

var unexpectedBeforeFixity: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeFixitySpecifier: UnexpectedNodesSyntax?

var unexpectedBetweenFixityAndOperatorKeyword: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenFixitySpecifierAndOperatorKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndOperatorPrecedenceAndTypes: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenNameAndOperatorPrecedenceAndTypes: UnexpectedNodesSyntax?

var unexpectedBetweenOperatorKeywordAndIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenOperatorKeywordAndName: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • NamedDeclSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

  • OperatorDeclSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |



  • SwiftSyntax
  • PrecedenceGroupDeclSyntax

Structure

PrecedenceGroupDeclSyntax

A Swift precedencegroup declaration.

struct PrecedenceGroupDeclSyntax

SyntaxNodesOP.swift

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • precedencegroupKeyword: precedencegroup

  • leftBrace: {

  • groupAttributes: PrecedenceGroupAttributeListSyntax

  • rightBrace: }

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, precedencegroupKeyword: TokenSyntax, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, leftBrace: TokenSyntax, UnexpectedNodesSyntax?, groupAttributes: PrecedenceGroupAttributeListSyntax, UnexpectedNodesSyntax?, rightBrace: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, precedencegroupKeyword: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, leftBrace: TokenSyntax, UnexpectedNodesSyntax?, groupAttributes: PrecedenceGroupAttributeListSyntax, UnexpectedNodesSyntax?, rightBrace: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

The attributes applied to the ‘precedencegroup’ declaration.

var groupAttributes: PrecedenceGroupAttributeListSyntax

The characteristics of this precedence group.

var identifier: TokenSyntax Deprecated

var leftBrace: TokenSyntax

var modifiers: DeclModifierListSyntax

The declaration modifiers applied to the ‘precedencegroup’ declaration.

var name: TokenSyntax

The name of this precedence group.

var precedencegroupKeyword: TokenSyntax

var rightBrace: TokenSyntax

var unexpectedAfterRightBrace: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenGroupAttributesAndRightBrace: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndLeftBrace: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftBraceAndGroupAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndPrecedencegroupKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndLeftBrace: UnexpectedNodesSyntax?

var unexpectedBetweenPrecedencegroupKeywordAndIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenPrecedencegroupKeywordAndName: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s groupAttributes collection.

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • BracedSyntax
  • DeclSyntaxProtocol
  • NamedDeclSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

  • PrecedenceGroupDeclSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ProtocolDeclSyntax

Structure

ProtocolDeclSyntax

A protocol declaration

struct ProtocolDeclSyntax

SyntaxNodesOP.swift

Overview

An example of a protocol declaration is

protocol Example { var isValid: Bool { get } }

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • protocolKeyword: protocol

  • primaryAssociatedTypeClause: PrimaryAssociatedTypeClauseSyntax?

  • inheritanceClause: InheritanceClauseSyntax?

  • genericWhereClause: GenericWhereClauseSyntax?

  • memberBlock: MemberBlockSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, protocolKeyword: TokenSyntax, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, primaryAssociatedTypeClause: PrimaryAssociatedTypeClauseSyntax?, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, memberBlock: MemberBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, protocolKeyword: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, primaryAssociatedTypeClause: PrimaryAssociatedTypeClauseSyntax?, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, memberBlock: MemberBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

Attributes attached to the protocol declaration, such as an @available attribute.

var genericWhereClause: GenericWhereClauseSyntax?

The where clause that applies to the generic parameters of this protocol declaration.

var identifier: TokenSyntax Deprecated

var inheritanceClause: InheritanceClauseSyntax?

The inheritance clause describing one or more conformances for this protocol declaration.

var memberBlock: MemberBlockSyntax

The members of the protocol declaration.

var modifiers: DeclModifierListSyntax

Modifiers attached to the protocol declaration, such as public.

var name: TokenSyntax

The name of the protocol.

var primaryAssociatedTypeClause: PrimaryAssociatedTypeClauseSyntax?

The primary associated type for the protocol.

var protocolKeyword: TokenSyntax

The protocol keyword for this declaration.

var unexpectedAfterMemberBlock: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenGenericWhereClauseAndMemberBlock: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndPrimaryAssociatedTypeClause: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenInheritanceClauseAndGenericWhereClause: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndProtocolKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndPrimaryAssociatedTypeClause: UnexpectedNodesSyntax?

var unexpectedBetweenPrimaryAssociatedTypeClauseAndInheritanceClause: UnexpectedNodesSyntax?

var unexpectedBetweenProtocolKeywordAndIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenProtocolKeywordAndName: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclGroupSyntax
  • DeclSyntaxProtocol
  • NamedDeclSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

  • ProtocolDeclSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • StructDeclSyntax

Structure

StructDeclSyntax

A struct declaration

struct StructDeclSyntax

SyntaxNodesQRS.swift

Overview

An example of a struct declaration is

struct SomeStruct { let someMember: String var anotherMember: Int

func foo() { print(someMember) }

mutating func bar() { anotherMember = 42 } }

A struct declaration may be declared without any members.

struct EmptyStruct {

}

A struct declaration may include a type inheritance clause listing one or more protocols the struct conforms to.

The example below uses Hashable and Equatable protocols whose members are automatically synthesized by the compiler if the struct contains stored members that are themselves Hashable and Equatable.

struct AdvancedStruct: Hashable, Equatable { let someMember: String var anotherMember: Int }

A struct declaration may include a generic parameter clause as well as a generic where clause.

var items: [Element] = []

mutating func push(_ item: Element) { items.append(item) }

return items.removeLast() } }

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • structKeyword: struct

  • genericParameterClause: GenericParameterClauseSyntax?

  • inheritanceClause: InheritanceClauseSyntax?

  • genericWhereClause: GenericWhereClauseSyntax?

  • memberBlock: MemberBlockSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, structKeyword: TokenSyntax, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, memberBlock: MemberBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, structKeyword: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, inheritanceClause: InheritanceClauseSyntax?, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, memberBlock: MemberBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

Attributes that are attached to the struct declaration.

var genericParameterClause: GenericParameterClauseSyntax?

The generic parameters, if any, of the struct declaration.

var genericWhereClause: GenericWhereClauseSyntax?

The where clause that applies to the generic parameters of this struct declaration.

var identifier: TokenSyntax Deprecated

var inheritanceClause: InheritanceClauseSyntax?

The struct declaration inheritance clause describing one or more conformances for this struct declaration.

var memberBlock: MemberBlockSyntax

The members of the struct declaration. Because struct extension declarations may declare additional members the contents of this member block isn’t guaranteed to be a complete list of members for this type.

var modifiers: DeclModifierListSyntax

Modifiers like public that are attached to the struct declaration.

var name: TokenSyntax

Declares the name of this struct. If the name matches a reserved keyword use backticks to escape it.

var structKeyword: TokenSyntax

The struct keyword for this declaration.

var unexpectedAfterMemberBlock: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenGenericParameterClauseAndInheritanceClause: UnexpectedNodesSyntax?

var unexpectedBetweenGenericWhereClauseAndMemberBlock: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndGenericParameterClause: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenInheritanceClauseAndGenericWhereClause: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndStructKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndGenericParameterClause: UnexpectedNodesSyntax?

var unexpectedBetweenStructKeywordAndIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenStructKeywordAndName: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclGroupSyntax
  • DeclSyntaxProtocol
  • NamedDeclSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithGenericParametersSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

  • StructDeclSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

404 - Not Found

If you were expecting to find a page here, please raise an issue.

From here, you'll want to go to the home page or search for a package.

| |


  • SwiftSyntax
  • TypeAliasDeclSyntax

Structure

TypeAliasDeclSyntax

struct TypeAliasDeclSyntax

SyntaxNodesTUVWXYZ.swift

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • typealiasKeyword: typealias

  • genericParameterClause: GenericParameterClauseSyntax?

  • initializer: TypeInitializerClauseSyntax

  • genericWhereClause: GenericWhereClauseSyntax?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, typealiasKeyword: TokenSyntax, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, initializer: TypeInitializerClauseSyntax, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, typealiasKeyword: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax?, UnexpectedNodesSyntax?, initializer: TypeInitializerClauseSyntax, UnexpectedNodesSyntax?, genericWhereClause: GenericWhereClauseSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

var genericParameterClause: GenericParameterClauseSyntax?

The parameter clause that defines the generic parameters.

var genericWhereClause: GenericWhereClauseSyntax?

A where clause that places additional constraints on generic parameters like where Element: Hashable.

var identifier: TokenSyntax Deprecated

var initializer: TypeInitializerClauseSyntax

var modifiers: DeclModifierListSyntax

var name: TokenSyntax

var typealiasKeyword: TokenSyntax

var unexpectedAfterGenericWhereClause: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenGenericParameterClauseAndInitializer: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndGenericParameterClause: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenInitializerAndGenericWhereClause: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndTypealiasKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndGenericParameterClause: UnexpectedNodesSyntax?

var unexpectedBetweenTypealiasKeywordAndIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenTypealiasKeywordAndName: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • NamedDeclSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithGenericParametersSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

  • TypeAliasDeclSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • VariableDeclSyntax

Structure

VariableDeclSyntax

Declaration of one or more variables

struct VariableDeclSyntax

SyntaxNodesTUVWXYZ.swift

Overview

The core of a variable declaration consists of a binding specifier ( let or var), followed by any number of pattern bindings, which define the variables.

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • bindingSpecifier: ( let | var | inout | _mutating | _borrowing | _consuming)

  • bindings: PatternBindingListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, bindingKeyword: TokenSyntax, UnexpectedNodesSyntax?, bindings: PatternBindingListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, bindingSpecifier: TokenSyntax, UnexpectedNodesSyntax?, bindings: PatternBindingListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

var bindingKeyword: TokenSyntax Deprecated

var bindingSpecifier: TokenSyntax

The specifier that defines the type of the variables declared ( let or var).

var bindings: PatternBindingListSyntax

The pattern bindings that define the actual variables.

var modifiers: DeclModifierListSyntax

Modifiers modifiers applied to the variable declaration.

var unexpectedAfterBindings: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenBindingKeywordAndBindings: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenBindingSpecifierAndBindings: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndBindingKeyword: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenModifiersAndBindingSpecifier: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s bindings collection.

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • DeclSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax

See Also

Declarations

struct DeclSyntax

protocol DeclSyntaxProtocol

Protocol to which all DeclSyntax nodes conform.

struct MissingDeclSyntax

In case the source code is missing a declaration, this node stands in place of the missing declaration.

struct AccessorDeclSyntax

struct ActorDeclSyntax

struct AssociatedTypeDeclSyntax

An associatedtype declaration

struct ClassDeclSyntax

A class declaration

struct DeinitializerDeclSyntax

A deinit declaration

struct EditorPlaceholderDeclSyntax

struct EnumCaseDeclSyntax

A case declaration of a Swift enum. It can have 1 or more EnumCaseElement s inside, each declaring a different case of the enum.

struct EnumDeclSyntax

A Swift enum declaration.

struct ExtensionDeclSyntax

An extension declaration.

struct FunctionDeclSyntax

A Swift func declaration.

struct IfConfigDeclSyntax

struct ImportDeclSyntax

An import declaration

  • VariableDeclSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ExprSyntax

Structure

ExprSyntax

struct ExprSyntax

SyntaxBaseNodes.swift

Subtypes

  • ArrayExprSyntax

  • ArrowExprSyntax

  • AsExprSyntax

  • AssignmentExprSyntax

  • AwaitExprSyntax

  • BinaryOperatorExprSyntax

  • BooleanLiteralExprSyntax

  • BorrowExprSyntax

  • ClosureExprSyntax

  • ConsumeExprSyntax

  • CopyExprSyntax

  • DeclReferenceExprSyntax

  • DictionaryExprSyntax

  • DiscardAssignmentExprSyntax

  • EditorPlaceholderExprSyntax

  • FloatLiteralExprSyntax

  • ForceUnwrapExprSyntax

  • FunctionCallExprSyntax

  • GenericSpecializationExprSyntax

  • IfExprSyntax

  • InOutExprSyntax

  • InfixOperatorExprSyntax

  • IntegerLiteralExprSyntax

  • IsExprSyntax

  • KeyPathExprSyntax

  • MacroExpansionExprSyntax

  • MemberAccessExprSyntax

  • MissingExprSyntax

  • NilLiteralExprSyntax

  • OptionalChainingExprSyntax

  • PackElementExprSyntax

  • PackExpansionExprSyntax

  • PatternExprSyntax

  • PostfixIfConfigExprSyntax

  • PostfixOperatorExprSyntax

  • PrefixOperatorExprSyntax

  • RegexLiteralExprSyntax

  • SequenceExprSyntax

  • SimpleStringLiteralExprSyntax

  • StringLiteralExprSyntax

  • SubscriptCallExprSyntax

  • SuperExprSyntax

  • SwitchExprSyntax

  • TernaryExprSyntax

  • TryExprSyntax

  • TupleExprSyntax

  • TypeExprSyntax

  • UnresolvedAsExprSyntax

  • UnresolvedIsExprSyntax

  • UnresolvedTernaryExprSyntax

Topics

Initializers

init?((some ExprSyntaxProtocol)?)

Create a ExprSyntax node from a specialized optional syntax node.

init(some ExprSyntaxProtocol)

Create a ExprSyntax node from a specialized syntax node.

init?(some SyntaxProtocol)

init(fromProtocol: any ExprSyntaxProtocol)

init?(fromProtocol: (any ExprSyntaxProtocol)?)

Instance Methods

Get an enum that can be used to exhaustively switch over all Expr syntax nodes.

Return the non-type erased version of this syntax node.

Syntax nodes always conform to ExprSyntaxProtocol. This API is just added for consistency.

Deprecated

Type Properties

static var structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • ExprSyntax
  • Subtypes
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ExprSyntaxProtocol

Protocol

ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

protocol ExprSyntaxProtocol : SyntaxProtocol

SyntaxBaseNodes.swift

Overview

Extension point to add common methods to all ExprSyntax nodes.

Topics

Instance Methods

Attempts to cast the current syntax node to a given specialized syntax type.

Attempts to cast the current syntax node to a given node type from the a base node protocol hierarchy other than ExprSyntaxProtocol.

Deprecated

Attempts to upcast the current syntax node to its base node type ( ExprSyntax).

Force-casts the current syntax node to a given specialized syntax type.

Force-upcast the current syntax node to its base node type ( ExprSyntax).

Force-casts the current syntax node to a given node type from a base node protocol hierarchy other than ExprSyntaxProtocol.

Checks if the current syntax node can be cast to a given node type from a base node protocol hierarchy other than ExprSyntaxProtocol.

Checks if the current syntax node can be upcast to its base node type ( ExprSyntax).

Checks if the current syntax node can be cast to a given specialized syntax type.

Relationships

Inherits From

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxProtocol

Conforming Types

  • ArrayExprSyntax
  • ArrowExprSyntax
  • AsExprSyntax
  • AssignmentExprSyntax
  • AwaitExprSyntax
  • BinaryOperatorExprSyntax
  • BooleanLiteralExprSyntax
  • BorrowExprSyntax
  • ClosureExprSyntax
  • ConsumeExprSyntax
  • CopyExprSyntax
  • DeclReferenceExprSyntax
  • DictionaryExprSyntax
  • DiscardAssignmentExprSyntax
  • EditorPlaceholderExprSyntax
  • ExprSyntax
  • FloatLiteralExprSyntax
  • ForceUnwrapExprSyntax
  • FunctionCallExprSyntax
  • GenericSpecializationExprSyntax
  • IfExprSyntax
  • InOutExprSyntax
  • InfixOperatorExprSyntax
  • IntegerLiteralExprSyntax
  • IsExprSyntax
  • KeyPathExprSyntax
  • MacroExpansionExprSyntax
  • MemberAccessExprSyntax
  • MissingExprSyntax
  • NilLiteralExprSyntax
  • OptionalChainingExprSyntax
  • PackElementExprSyntax
  • PackExpansionExprSyntax
  • PatternExprSyntax
  • PostfixIfConfigExprSyntax
  • PostfixOperatorExprSyntax
  • PrefixOperatorExprSyntax
  • RegexLiteralExprSyntax
  • SequenceExprSyntax
  • SimpleStringLiteralExprSyntax
  • StringLiteralExprSyntax
  • SubscriptCallExprSyntax
  • SuperExprSyntax
  • SwitchExprSyntax
  • TernaryExprSyntax
  • TryExprSyntax
  • TupleExprSyntax
  • TypeExprSyntax
  • UnresolvedAsExprSyntax
  • UnresolvedIsExprSyntax
  • UnresolvedTernaryExprSyntax

See Also

Expressions

struct ExprSyntax

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • ExprSyntaxProtocol
  • Overview
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • MissingExprSyntax

Structure

MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct MissingExprSyntax

SyntaxNodesJKLMN.swift

Topics

Initializers

init()

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, placeholder: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var placeholder: TokenSyntax

var unexpectedAfterPlaceholder: UnexpectedNodesSyntax?

var unexpectedBeforePlaceholder: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • MissingNodeSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • MissingExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ArrayExprSyntax

Structure

ArrayExprSyntax

An array literal.

struct ArrayExprSyntax

SyntaxNodesAB.swift

Children

  • leftSquare: ``
    \
  • elements: [ArrayElementListSyntax
    \
  • rightSquare: ]

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftSquare: TokenSyntax, UnexpectedNodesSyntax?, elements: ArrayElementListSyntax, UnexpectedNodesSyntax?, rightSquare: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftSquareBracket: TokenSyntax, UnexpectedNodesSyntax?, elements: ArrayElementListSyntax, UnexpectedNodesSyntax?, rightSquareBracket: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var elements: ArrayElementListSyntax

var leftSquare: TokenSyntax

var leftSquareBracket: TokenSyntax Deprecated

var rightSquare: TokenSyntax

var rightSquareBracket: TokenSyntax Deprecated

var unexpectedAfterRightSquare: UnexpectedNodesSyntax?

var unexpectedAfterRightSquareBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeLeftSquare: UnexpectedNodesSyntax?

var unexpectedBeforeLeftSquareBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenElementsAndRightSquare: UnexpectedNodesSyntax?

var unexpectedBetweenElementsAndRightSquareBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftSquareAndElements: UnexpectedNodesSyntax?

var unexpectedBetweenLeftSquareBracketAndElements: UnexpectedNodesSyntax? Deprecated

Instance Methods

Adds the provided element to the node’s elements collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • ArrayExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ArrowExprSyntax

Structure

ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct ArrowExprSyntax

SyntaxNodesAB.swift

Examples

This represents the arrow in

Children

  • effectSpecifiers: TypeEffectSpecifiersSyntax?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, effectSpecifiers: TypeEffectSpecifiersSyntax?, UnexpectedNodesSyntax?, arrow: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, effectSpecifiers: TypeEffectSpecifiersSyntax?, UnexpectedNodesSyntax?, arrowToken: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var arrow: TokenSyntax

var arrowToken: TokenSyntax Deprecated

var effectSpecifiers: TypeEffectSpecifiersSyntax?

var unexpectedAfterArrow: UnexpectedNodesSyntax?

var unexpectedAfterArrowToken: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeEffectSpecifiers: UnexpectedNodesSyntax?

var unexpectedBetweenEffectSpecifiersAndArrow: UnexpectedNodesSyntax?

var unexpectedBetweenEffectSpecifiersAndArrowToken: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • ArrowExprSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AsExprSyntax

Structure

AsExprSyntax

The cast of an expressison to a different type.

struct AsExprSyntax

SyntaxNodesAB.swift

Examples

dog as Animal

myPet as? Dog

Children

  • expression: ExprSyntax

  • asKeyword: as

  • questionOrExclamationMark: ( ? | !)?

  • type: TypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, asKeyword: TokenSyntax, UnexpectedNodesSyntax?, questionOrExclamationMark: TokenSyntax?, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, asTok: TokenSyntax, UnexpectedNodesSyntax?, questionOrExclamationMark: TokenSyntax?, UnexpectedNodesSyntax?, typeName: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var asKeyword: TokenSyntax

var asTok: TokenSyntax Deprecated

var expression: ExprSyntax

var questionOrExclamationMark: TokenSyntax?

var type: TypeSyntax

var typeName: TypeSyntax Deprecated

var unexpectedAfterType: UnexpectedNodesSyntax?

var unexpectedAfterTypeName: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeExpression: UnexpectedNodesSyntax?

var unexpectedBetweenAsKeywordAndQuestionOrExclamationMark: UnexpectedNodesSyntax?

var unexpectedBetweenAsTokAndQuestionOrExclamationMark: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenExpressionAndAsKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenExpressionAndAsTok: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenQuestionOrExclamationMarkAndType: UnexpectedNodesSyntax?

var unexpectedBetweenQuestionOrExclamationMarkAndTypeName: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • AsExprSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AssignmentExprSyntax

Structure

AssignmentExprSyntax

struct AssignmentExprSyntax

SyntaxNodesAB.swift

Children

  • equal: =

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, assignToken: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, equal: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var assignToken: TokenSyntax Deprecated

var equal: TokenSyntax

var unexpectedAfterAssignToken: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterEqual: UnexpectedNodesSyntax?

var unexpectedBeforeAssignToken: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeEqual: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • AssignmentExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AwaitExprSyntax

Structure

AwaitExprSyntax

struct AwaitExprSyntax

SyntaxNodesAB.swift

Children

  • awaitKeyword: await

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, awaitKeyword: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var awaitKeyword: TokenSyntax

var expression: ExprSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeAwaitKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenAwaitKeywordAndExpression: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • AwaitExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • BinaryOperatorExprSyntax

Structure

BinaryOperatorExprSyntax

An operator like + or -.

struct BinaryOperatorExprSyntax

SyntaxNodesAB.swift

Overview

This node represents the binary operator itself. It can occur inside a SequenceExprSyntax after parsing and will be the operator child of an InfixOperatorExprSyntax after folding operator using the SwiftOperators library.

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, operator: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, operatorToken: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var `operator`: TokenSyntax

var operatorToken: TokenSyntax Deprecated

var unexpectedAfterOperator: UnexpectedNodesSyntax?

var unexpectedAfterOperatorToken: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeOperator: UnexpectedNodesSyntax?

var unexpectedBeforeOperatorToken: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • BinaryOperatorExprSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • BooleanLiteralExprSyntax

Structure

BooleanLiteralExprSyntax

struct BooleanLiteralExprSyntax

SyntaxNodesAB.swift

Children

  • literal: ( true | false)

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, booleanLiteral: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, literal: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var booleanLiteral: TokenSyntax Deprecated

var literal: TokenSyntax

var unexpectedAfterBooleanLiteral: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterLiteral: UnexpectedNodesSyntax?

var unexpectedBeforeBooleanLiteral: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeLiteral: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • BooleanLiteralExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • BorrowExprSyntax

Structure

BorrowExprSyntax

struct BorrowExprSyntax

SyntaxNodesAB.swift

Children

  • borrowKeyword: ( _borrow | borrow)

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, borrowKeyword: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var borrowKeyword: TokenSyntax

var expression: ExprSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeBorrowKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenBorrowKeywordAndExpression: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • BorrowExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ClosureExprSyntax

Structure

ClosureExprSyntax

struct ClosureExprSyntax

SyntaxNodesC.swift

Children

  • leftBrace: {

  • signature: ClosureSignatureSyntax?

  • statements: CodeBlockItemListSyntax

  • rightBrace: }

Contained in

  • FunctionCallExprSyntax. trailingClosure

  • MacroExpansionDeclSyntax. trailingClosure

  • MacroExpansionExprSyntax. trailingClosure

  • MultipleTrailingClosureElementSyntax. closure

  • SubscriptCallExprSyntax. trailingClosure

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftBrace: TokenSyntax, UnexpectedNodesSyntax?, signature: ClosureSignatureSyntax?, UnexpectedNodesSyntax?, statements: CodeBlockItemListSyntax, UnexpectedNodesSyntax?, rightBrace: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var leftBrace: TokenSyntax

var rightBrace: TokenSyntax

var signature: ClosureSignatureSyntax?

var statements: CodeBlockItemListSyntax

var unexpectedAfterRightBrace: UnexpectedNodesSyntax?

var unexpectedBeforeLeftBrace: UnexpectedNodesSyntax?

var unexpectedBetweenLeftBraceAndSignature: UnexpectedNodesSyntax?

var unexpectedBetweenSignatureAndStatements: UnexpectedNodesSyntax?

var unexpectedBetweenStatementsAndRightBrace: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s statements collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • BracedSyntax
  • ExprSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithStatementsSyntax

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • ClosureExprSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ConsumeExprSyntax

Structure

ConsumeExprSyntax

struct ConsumeExprSyntax

SyntaxNodesC.swift

Children

  • consumeKeyword: ( _move | consume)

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, consumeKeyword: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, moveKeyword: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var consumeKeyword: TokenSyntax

var expression: ExprSyntax

var moveKeyword: TokenSyntax Deprecated

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeConsumeKeyword: UnexpectedNodesSyntax?

var unexpectedBeforeMoveKeyword: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenConsumeKeywordAndExpression: UnexpectedNodesSyntax?

var unexpectedBetweenMoveKeywordAndExpression: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • ConsumeExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CopyExprSyntax

Structure

CopyExprSyntax

struct CopyExprSyntax

SyntaxNodesC.swift

Children

  • copyKeyword: copy

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, copyKeyword: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var copyKeyword: TokenSyntax

var expression: ExprSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeCopyKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenCopyKeywordAndExpression: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct DeclReferenceExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • CopyExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DeclReferenceExprSyntax

Structure

DeclReferenceExprSyntax

struct DeclReferenceExprSyntax

SyntaxNodesD.swift

Children

  • argumentNames: DeclNameArgumentsSyntax?

Contained in

  • DynamicReplacementAttributeArgumentsSyntax. declName

  • ImplementsAttributeArgumentsSyntax. declName

  • KeyPathPropertyComponentSyntax. declName

  • MemberAccessExprSyntax. declName

  • SpecializeTargetFunctionArgumentSyntax. declName

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, baseName: TokenSyntax, UnexpectedNodesSyntax?, argumentNames: DeclNameArgumentsSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, declNameArguments: DeclNameArgumentsSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var argumentNames: DeclNameArgumentsSyntax?

var baseName: TokenSyntax

var declNameArguments: DeclNameArgumentsSyntax? Deprecated

var identifier: TokenSyntax Deprecated

var unexpectedAfterArgumentNames: UnexpectedNodesSyntax?

var unexpectedAfterDeclNameArguments: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeBaseName: UnexpectedNodesSyntax?

var unexpectedBeforeIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenBaseNameAndArgumentNames: UnexpectedNodesSyntax?

var unexpectedBetweenIdentifierAndDeclNameArguments: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DictionaryExprSyntax

A dictionary literal

  • DeclReferenceExprSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DictionaryExprSyntax

Structure

DictionaryExprSyntax

A dictionary literal

struct DictionaryExprSyntax

SyntaxNodesD.swift

Children

  • leftSquare: ``
    \
  • content: ( : | [DictionaryElementListSyntax)
    \
  • rightSquare: ]

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftSquare: TokenSyntax, UnexpectedNodesSyntax?, content: DictionaryExprSyntax.Content, UnexpectedNodesSyntax?, rightSquare: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var content: DictionaryExprSyntax.Content

var leftSquare: TokenSyntax

var rightSquare: TokenSyntax

var unexpectedAfterRightSquare: UnexpectedNodesSyntax?

var unexpectedBeforeLeftSquare: UnexpectedNodesSyntax?

var unexpectedBetweenContentAndRightSquare: UnexpectedNodesSyntax?

var unexpectedBetweenLeftSquareAndContent: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Content

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • DictionaryExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DiscardAssignmentExprSyntax

Structure

DiscardAssignmentExprSyntax

A _ that discards a value inside an assignment.

struct DiscardAssignmentExprSyntax

SyntaxNodesD.swift

Examples

_ = 42

if case .foo(_) = myValue

Children

  • wildcard: _

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, wildcard: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var unexpectedAfterWildcard: UnexpectedNodesSyntax?

var unexpectedBeforeWildcard: UnexpectedNodesSyntax?

var wildcard: TokenSyntax

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • DiscardAssignmentExprSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • EditorPlaceholderExprSyntax

Structure

EditorPlaceholderExprSyntax

struct EditorPlaceholderExprSyntax

SyntaxNodesEF.swift

Overview

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, placeholder: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var identifier: TokenSyntax Deprecated

var placeholder: TokenSyntax

var unexpectedAfterIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterPlaceholder: UnexpectedNodesSyntax?

var unexpectedBeforeIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforePlaceholder: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • EditorPlaceholderExprSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • FloatLiteralExprSyntax

Structure

FloatLiteralExprSyntax

struct FloatLiteralExprSyntax

SyntaxNodesEF.swift

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, floatingDigits: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, literal: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var floatingDigits: TokenSyntax Deprecated

var literal: TokenSyntax

var representedLiteralValue: Double?

A computed property representing the floating-point value parsed from the associated literal.text property.

var unexpectedAfterFloatingDigits: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterLiteral: UnexpectedNodesSyntax?

var unexpectedBeforeFloatingDigits: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeLiteral: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • FloatLiteralExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ForceUnwrapExprSyntax

Structure

ForceUnwrapExprSyntax

struct ForceUnwrapExprSyntax

SyntaxNodesEF.swift

Children

  • expression: ExprSyntax

  • exclamationMark: !

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, exclamationMark: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var exclamationMark: TokenSyntax

var expression: ExprSyntax

var unexpectedAfterExclamationMark: UnexpectedNodesSyntax?

var unexpectedBeforeExpression: UnexpectedNodesSyntax?

var unexpectedBetweenExpressionAndExclamationMark: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • ForceUnwrapExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • FunctionCallExprSyntax

Structure

FunctionCallExprSyntax

struct FunctionCallExprSyntax

SyntaxNodesEF.swift

Children

  • calledExpression: ExprSyntax

  • leftParen: (?

  • arguments: LabeledExprListSyntax

  • rightParen: )?

  • trailingClosure: ClosureExprSyntax?

  • additionalTrailingClosures: MultipleTrailingClosureElementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, calledExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, leftParen: TokenSyntax?, UnexpectedNodesSyntax?, argumentList: LabeledExprListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax?, UnexpectedNodesSyntax?, trailingClosure: ClosureExprSyntax?, UnexpectedNodesSyntax?, additionalTrailingClosures: MultipleTrailingClosureElementListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, calledExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, leftParen: TokenSyntax?, UnexpectedNodesSyntax?, arguments: LabeledExprListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax?, UnexpectedNodesSyntax?, trailingClosure: ClosureExprSyntax?, UnexpectedNodesSyntax?, additionalTrailingClosures: MultipleTrailingClosureElementListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var additionalTrailingClosures: MultipleTrailingClosureElementListSyntax

var argumentList: LabeledExprListSyntax Deprecated

var arguments: LabeledExprListSyntax

var calledExpression: ExprSyntax

var leftParen: TokenSyntax?

var rightParen: TokenSyntax?

var trailingClosure: ClosureExprSyntax?

var unexpectedAfterAdditionalTrailingClosures: UnexpectedNodesSyntax?

var unexpectedBeforeCalledExpression: UnexpectedNodesSyntax?

var unexpectedBetweenArgumentListAndRightParen: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenArgumentsAndRightParen: UnexpectedNodesSyntax?

var unexpectedBetweenCalledExpressionAndLeftParen: UnexpectedNodesSyntax?

var unexpectedBetweenLeftParenAndArgumentList: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftParenAndArguments: UnexpectedNodesSyntax?

var unexpectedBetweenRightParenAndTrailingClosure: UnexpectedNodesSyntax?

var unexpectedBetweenTrailingClosureAndAdditionalTrailingClosures: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s additionalTrailingClosures collection.

Deprecated

Adds the provided element to the node’s arguments collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • FunctionCallExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |



  • SwiftSyntax
  • IfExprSyntax

Structure

IfExprSyntax

struct IfExprSyntax

SyntaxNodesGHI.swift

Children

  • ifKeyword: if

  • conditions: ConditionElementListSyntax

  • body: CodeBlockSyntax

  • elseKeyword: else?

  • elseBody: ( IfExprSyntax | CodeBlockSyntax)?

Contained in

  • IfExprSyntax. elseBody

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, ifKeyword: TokenSyntax, UnexpectedNodesSyntax?, conditions: ConditionElementListSyntax, UnexpectedNodesSyntax?, body: CodeBlockSyntax, UnexpectedNodesSyntax?, elseKeyword: TokenSyntax?, UnexpectedNodesSyntax?, elseBody: IfExprSyntax.ElseBody?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var body: CodeBlockSyntax

var conditions: ConditionElementListSyntax

var elseBody: IfExprSyntax.ElseBody?

var elseKeyword: TokenSyntax?

var ifKeyword: TokenSyntax

var unexpectedAfterElseBody: UnexpectedNodesSyntax?

var unexpectedBeforeIfKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenBodyAndElseKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenConditionsAndBody: UnexpectedNodesSyntax?

var unexpectedBetweenElseKeywordAndElseBody: UnexpectedNodesSyntax?

var unexpectedBetweenIfKeywordAndConditions: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s conditions collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum ElseBody

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithCodeBlockSyntax

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • IfExprSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • InOutExprSyntax

Structure

InOutExprSyntax

An expression prefixed with & to pass an argument to an inout parameter.

struct InOutExprSyntax

SyntaxNodesGHI.swift

Children

  • ampersand: &

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, ampersand: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var ampersand: TokenSyntax

var expression: ExprSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeAmpersand: UnexpectedNodesSyntax?

var unexpectedBetweenAmpersandAndExpression: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • InOutExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • InfixOperatorExprSyntax

Structure

InfixOperatorExprSyntax

An infix operator call like 1 + 2.

struct InfixOperatorExprSyntax

SyntaxNodesGHI.swift

Overview

Children

  • leftOperand: ExprSyntax

  • operator: ExprSyntax

  • rightOperand: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftOperand: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, operator: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, rightOperand: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftOperand: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, operatorOperand: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, rightOperand: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var leftOperand: ExprSyntax

var `operator`: ExprSyntax

var operatorOperand: ExprSyntax Deprecated

var rightOperand: ExprSyntax

var unexpectedAfterRightOperand: UnexpectedNodesSyntax?

var unexpectedBeforeLeftOperand: UnexpectedNodesSyntax?

var unexpectedBetweenLeftOperandAndOperator: UnexpectedNodesSyntax?

var unexpectedBetweenLeftOperandAndOperatorOperand: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenOperatorAndRightOperand: UnexpectedNodesSyntax?

var unexpectedBetweenOperatorOperandAndRightOperand: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • InfixOperatorExprSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • IntegerLiteralExprSyntax

Structure

IntegerLiteralExprSyntax

struct IntegerLiteralExprSyntax

SyntaxNodesGHI.swift

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, digits: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, literal: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var digits: TokenSyntax Deprecated

var literal: TokenSyntax

var radix: IntegerLiteralExprSyntax.Radix

var representedLiteralValue: Int?

A computed property representing the integer value parsed from the associated literal.text property, considering the specified radix.

var unexpectedAfterDigits: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterLiteral: UnexpectedNodesSyntax?

var unexpectedBeforeDigits: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeLiteral: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Radix

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • IntegerLiteralExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • IsExprSyntax

Structure

IsExprSyntax

Checks if an expression is of a given type.

struct IsExprSyntax

SyntaxNodesGHI.swift

Overview

An example of an is expression is

value is Double

Children

  • expression: ExprSyntax

  • isKeyword: is

  • type: TypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, isKeyword: TokenSyntax, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, isTok: TokenSyntax, UnexpectedNodesSyntax?, typeName: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var expression: ExprSyntax

The expression which will be checked to determine whether it can be cast to a specific type.

var isKeyword: TokenSyntax

The is keyword for this expression.

var isTok: TokenSyntax Deprecated

var type: TypeSyntax

The type against which the expression will be checked to see if the expression can be cast to it.

var typeName: TypeSyntax Deprecated

var unexpectedAfterType: UnexpectedNodesSyntax?

var unexpectedAfterTypeName: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeExpression: UnexpectedNodesSyntax?

var unexpectedBetweenExpressionAndIsKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenExpressionAndIsTok: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenIsKeywordAndType: UnexpectedNodesSyntax?

var unexpectedBetweenIsTokAndTypeName: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • IsExprSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • KeyPathExprSyntax

Structure

KeyPathExprSyntax

A key path.

struct KeyPathExprSyntax

SyntaxNodesJKLMN.swift

Examples

\a.b[2].a

Children

  • backslash: \

  • root: TypeSyntax?

  • components: KeyPathComponentListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, backslash: TokenSyntax, UnexpectedNodesSyntax?, root: (some TypeSyntaxProtocol)?, UnexpectedNodesSyntax?, components: KeyPathComponentListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var backslash: TokenSyntax

var components: KeyPathComponentListSyntax

var root: TypeSyntax?

var unexpectedAfterComponents: UnexpectedNodesSyntax?

var unexpectedBeforeBackslash: UnexpectedNodesSyntax?

var unexpectedBetweenBackslashAndRoot: UnexpectedNodesSyntax?

var unexpectedBetweenRootAndComponents: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s components collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • KeyPathExprSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • MacroExpansionExprSyntax

Structure

MacroExpansionExprSyntax

The expansion of a freestanding macro in a position that expects an expression.

struct MacroExpansionExprSyntax

SyntaxNodesJKLMN.swift

Children

  • pound: #

  • genericArgumentClause: GenericArgumentClauseSyntax?

  • leftParen: (?

  • arguments: LabeledExprListSyntax

  • rightParen: )?

  • trailingClosure: ClosureExprSyntax?

  • additionalTrailingClosures: MultipleTrailingClosureElementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, pound: TokenSyntax, UnexpectedNodesSyntax?, macroName: TokenSyntax, UnexpectedNodesSyntax?, genericArgumentClause: GenericArgumentClauseSyntax?, UnexpectedNodesSyntax?, leftParen: TokenSyntax?, UnexpectedNodesSyntax?, arguments: LabeledExprListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax?, UnexpectedNodesSyntax?, trailingClosure: ClosureExprSyntax?, UnexpectedNodesSyntax?, additionalTrailingClosures: MultipleTrailingClosureElementListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, poundToken: TokenSyntax, UnexpectedNodesSyntax?, macro: TokenSyntax, UnexpectedNodesSyntax?, genericArguments: GenericArgumentClauseSyntax?, UnexpectedNodesSyntax?, leftParen: TokenSyntax?, UnexpectedNodesSyntax?, argumentList: LabeledExprListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax?, UnexpectedNodesSyntax?, trailingClosure: ClosureExprSyntax?, UnexpectedNodesSyntax?, additionalTrailingClosures: MultipleTrailingClosureElementListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var additionalTrailingClosures: MultipleTrailingClosureElementListSyntax

var argumentList: LabeledExprListSyntax Deprecated

var arguments: LabeledExprListSyntax

var genericArgumentClause: GenericArgumentClauseSyntax?

var genericArguments: GenericArgumentClauseSyntax? Deprecated

var leftParen: TokenSyntax?

var macro: TokenSyntax Deprecated

var macroName: TokenSyntax

var pound: TokenSyntax

The # sign.

var poundToken: TokenSyntax Deprecated

var rightParen: TokenSyntax?

var trailingClosure: ClosureExprSyntax?

var unexpectedAfterAdditionalTrailingClosures: UnexpectedNodesSyntax?

var unexpectedBeforePound: UnexpectedNodesSyntax?

var unexpectedBeforePoundToken: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenArgumentListAndRightParen: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenArgumentsAndRightParen: UnexpectedNodesSyntax?

var unexpectedBetweenGenericArgumentClauseAndLeftParen: UnexpectedNodesSyntax?

var unexpectedBetweenGenericArgumentsAndLeftParen: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftParenAndArgumentList: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftParenAndArguments: UnexpectedNodesSyntax?

var unexpectedBetweenMacroAndGenericArguments: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenMacroNameAndGenericArgumentClause: UnexpectedNodesSyntax?

var unexpectedBetweenPoundAndMacroName: UnexpectedNodesSyntax?

var unexpectedBetweenPoundTokenAndMacro: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenRightParenAndTrailingClosure: UnexpectedNodesSyntax?

var unexpectedBetweenTrailingClosureAndAdditionalTrailingClosures: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s additionalTrailingClosures collection.

Deprecated

Adds the provided element to the node’s arguments collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • FreestandingMacroExpansionSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • MacroExpansionExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |



  • SwiftSyntax
  • NilLiteralExprSyntax

Structure

NilLiteralExprSyntax

struct NilLiteralExprSyntax

SyntaxNodesJKLMN.swift

Children

  • nilKeyword: nil

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, nilKeyword: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var nilKeyword: TokenSyntax

var unexpectedAfterNilKeyword: UnexpectedNodesSyntax?

var unexpectedBeforeNilKeyword: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • NilLiteralExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • OptionalChainingExprSyntax

Structure

OptionalChainingExprSyntax

struct OptionalChainingExprSyntax

SyntaxNodesOP.swift

Children

  • expression: ExprSyntax

  • questionMark: ?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, questionMark: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var expression: ExprSyntax

var questionMark: TokenSyntax

var unexpectedAfterQuestionMark: UnexpectedNodesSyntax?

var unexpectedBeforeExpression: UnexpectedNodesSyntax?

var unexpectedBetweenExpressionAndQuestionMark: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • OptionalChainingExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • PackElementExprSyntax

Structure

PackElementExprSyntax

A pack element expression spelled with each.

struct PackElementExprSyntax

SyntaxNodesOP.swift

Children

  • eachKeyword: each

  • pack: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, eachKeyword: TokenSyntax, UnexpectedNodesSyntax?, pack: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, eachKeyword: TokenSyntax, UnexpectedNodesSyntax?, packRefExpr: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var eachKeyword: TokenSyntax

var pack: ExprSyntax

var packRefExpr: ExprSyntax Deprecated

var unexpectedAfterPack: UnexpectedNodesSyntax?

var unexpectedAfterPackRefExpr: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeEachKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenEachKeywordAndPack: UnexpectedNodesSyntax?

var unexpectedBetweenEachKeywordAndPackRefExpr: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • PackElementExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • PackExpansionExprSyntax

Structure

PackExpansionExprSyntax

A pack expansion expression spelled with repeat.

struct PackExpansionExprSyntax

SyntaxNodesOP.swift

Children

  • repeatKeyword: repeat

  • repetitionPattern: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, repeatKeyword: TokenSyntax, UnexpectedNodesSyntax?, patternExpr: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, repeatKeyword: TokenSyntax, UnexpectedNodesSyntax?, repetitionPattern: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var patternExpr: ExprSyntax Deprecated

var repeatKeyword: TokenSyntax

var repetitionPattern: ExprSyntax

var unexpectedAfterPatternExpr: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterRepetitionPattern: UnexpectedNodesSyntax?

var unexpectedBeforeRepeatKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenRepeatKeywordAndPatternExpr: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenRepeatKeywordAndRepetitionPattern: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • PackExpansionExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • PatternExprSyntax

Structure

PatternExprSyntax

struct PatternExprSyntax

SyntaxNodesOP.swift

Children

  • pattern: PatternSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, pattern: some PatternSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var pattern: PatternSyntax

var unexpectedAfterPattern: UnexpectedNodesSyntax?

var unexpectedBeforePattern: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • PatternExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • PostfixIfConfigExprSyntax

Structure

PostfixIfConfigExprSyntax

struct PostfixIfConfigExprSyntax

SyntaxNodesOP.swift

Children

  • base: ExprSyntax?

  • config: IfConfigDeclSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, base: (some ExprSyntaxProtocol)?, UnexpectedNodesSyntax?, config: IfConfigDeclSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var base: ExprSyntax?

var config: IfConfigDeclSyntax

var unexpectedAfterConfig: UnexpectedNodesSyntax?

var unexpectedBeforeBase: UnexpectedNodesSyntax?

var unexpectedBetweenBaseAndConfig: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • PostfixIfConfigExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • PostfixOperatorExprSyntax

Structure

PostfixOperatorExprSyntax

struct PostfixOperatorExprSyntax

SyntaxNodesOP.swift

Children

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, operator: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, operatorToken: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var expression: ExprSyntax

var `operator`: TokenSyntax

var operatorToken: TokenSyntax Deprecated

var unexpectedAfterOperator: UnexpectedNodesSyntax?

var unexpectedAfterOperatorToken: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeExpression: UnexpectedNodesSyntax?

var unexpectedBetweenExpressionAndOperator: UnexpectedNodesSyntax?

var unexpectedBetweenExpressionAndOperatorToken: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • PostfixOperatorExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • PrefixOperatorExprSyntax

Structure

PrefixOperatorExprSyntax

A prefix operator applied to a value.

struct PrefixOperatorExprSyntax

SyntaxNodesOP.swift

Examples

-x

Children

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, operator: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, operatorToken: TokenSyntax, UnexpectedNodesSyntax?, postfixExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var expression: ExprSyntax

var `operator`: TokenSyntax

var operatorToken: TokenSyntax Deprecated

var postfixExpression: ExprSyntax Deprecated

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedAfterPostfixExpression: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeOperator: UnexpectedNodesSyntax?

var unexpectedBeforeOperatorToken: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenOperatorAndExpression: UnexpectedNodesSyntax?

var unexpectedBetweenOperatorTokenAndPostfixExpression: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • PrefixOperatorExprSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • RegexLiteralExprSyntax

Structure

RegexLiteralExprSyntax

struct RegexLiteralExprSyntax

SyntaxNodesQRS.swift

Children

  • openingSlash: /

  • closingSlash: /

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, openingPounds: TokenSyntax?, UnexpectedNodesSyntax?, openSlash: TokenSyntax, UnexpectedNodesSyntax?, regexPattern: TokenSyntax, UnexpectedNodesSyntax?, closeSlash: TokenSyntax, UnexpectedNodesSyntax?, closingPounds: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, openingPounds: TokenSyntax?, UnexpectedNodesSyntax?, openingSlash: TokenSyntax, UnexpectedNodesSyntax?, regex: TokenSyntax, UnexpectedNodesSyntax?, closingSlash: TokenSyntax, UnexpectedNodesSyntax?, closingPounds: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var closeSlash: TokenSyntax Deprecated

var closingPounds: TokenSyntax?

var closingSlash: TokenSyntax

var openSlash: TokenSyntax Deprecated

var openingPounds: TokenSyntax?

var openingSlash: TokenSyntax

var regex: TokenSyntax

var regexPattern: TokenSyntax Deprecated

var unexpectedAfterClosingPounds: UnexpectedNodesSyntax?

var unexpectedBeforeOpeningPounds: UnexpectedNodesSyntax?

var unexpectedBetweenCloseSlashAndClosingPounds: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenClosingSlashAndClosingPounds: UnexpectedNodesSyntax?

var unexpectedBetweenOpenSlashAndRegexPattern: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenOpeningPoundsAndOpenSlash: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenOpeningPoundsAndOpeningSlash: UnexpectedNodesSyntax?

var unexpectedBetweenOpeningSlashAndRegex: UnexpectedNodesSyntax?

var unexpectedBetweenRegexAndClosingSlash: UnexpectedNodesSyntax?

var unexpectedBetweenRegexPatternAndCloseSlash: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • RegexLiteralExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SequenceExprSyntax

Structure

SequenceExprSyntax

A flat list of expressions before operator folding using the SwiftOperators library.

struct SequenceExprSyntax

SyntaxNodesQRS.swift

Examples

1 + 2 + 3

Children

  • elements: ExprListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, elements: ExprListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var elements: ExprListSyntax

var unexpectedAfterElements: UnexpectedNodesSyntax?

var unexpectedBeforeElements: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s elements collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • SequenceExprSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SimpleStringLiteralExprSyntax

Structure

SimpleStringLiteralExprSyntax

A simple string that can’t contain string interpolation and cannot have raw string delimiters.

struct SimpleStringLiteralExprSyntax

SyntaxNodesQRS.swift

Children

  • openingQuote: ( " | """)

  • segments: SimpleStringLiteralSegmentListSyntax

  • closingQuote: ( " | """)

Contained in

  • AvailabilityLabeledArgumentSyntax. value

  • PoundSourceLocationArgumentsSyntax. fileName

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, openingQuote: TokenSyntax, UnexpectedNodesSyntax?, segments: SimpleStringLiteralSegmentListSyntax, UnexpectedNodesSyntax?, closingQuote: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var closingQuote: TokenSyntax

Close quote for the string literal

var openingQuote: TokenSyntax

Open quote for the string literal

var segments: SimpleStringLiteralSegmentListSyntax

String content

var unexpectedAfterClosingQuote: UnexpectedNodesSyntax?

var unexpectedBeforeOpeningQuote: UnexpectedNodesSyntax?

var unexpectedBetweenOpeningQuoteAndSegments: UnexpectedNodesSyntax?

var unexpectedBetweenSegmentsAndClosingQuote: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s segments collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • SimpleStringLiteralExprSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • StringLiteralExprSyntax

Structure

StringLiteralExprSyntax

A string literal.

struct StringLiteralExprSyntax

SyntaxNodesQRS.swift

Examples

"Hello (userName())!"

Children

  • openingQuote: ( " | """ | ')

  • segments: StringLiteralSegmentListSyntax

  • closingQuote: ( " | """ | ')

Contained in

  • AttributeSyntax. arguments

  • ConventionAttributeArgumentsSyntax. cTypeString

  • DocumentationAttributeArgumentSyntax. value

  • ExposeAttributeArgumentsSyntax. cxxName

  • OpaqueReturnTypeOfAttributeArgumentsSyntax. mangledName

  • OriginallyDefinedInAttributeArgumentsSyntax. moduleName

  • UnavailableFromAsyncAttributeArgumentsSyntax. message

  • UnderscorePrivateAttributeArgumentsSyntax. filename

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, openDelimiter: TokenSyntax?, UnexpectedNodesSyntax?, openQuote: TokenSyntax, UnexpectedNodesSyntax?, segments: StringLiteralSegmentListSyntax, UnexpectedNodesSyntax?, closeQuote: TokenSyntax, UnexpectedNodesSyntax?, closeDelimiter: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, openingPounds: TokenSyntax?, UnexpectedNodesSyntax?, openingQuote: TokenSyntax, UnexpectedNodesSyntax?, segments: StringLiteralSegmentListSyntax, UnexpectedNodesSyntax?, closingQuote: TokenSyntax, UnexpectedNodesSyntax?, closingPounds: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var closeDelimiter: TokenSyntax? Deprecated

var closeQuote: TokenSyntax Deprecated

var closingPounds: TokenSyntax?

var closingQuote: TokenSyntax

var openDelimiter: TokenSyntax? Deprecated

var openQuote: TokenSyntax Deprecated

var openingPounds: TokenSyntax?

var openingQuote: TokenSyntax

var segments: StringLiteralSegmentListSyntax

var unexpectedAfterCloseDelimiter: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterClosingPounds: UnexpectedNodesSyntax?

var unexpectedBeforeOpenDelimiter: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeOpeningPounds: UnexpectedNodesSyntax?

var unexpectedBetweenCloseQuoteAndCloseDelimiter: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenClosingQuoteAndClosingPounds: UnexpectedNodesSyntax?

var unexpectedBetweenOpenDelimiterAndOpenQuote: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenOpenQuoteAndSegments: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenOpeningPoundsAndOpeningQuote: UnexpectedNodesSyntax?

var unexpectedBetweenOpeningQuoteAndSegments: UnexpectedNodesSyntax?

var unexpectedBetweenSegmentsAndCloseQuote: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenSegmentsAndClosingQuote: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s segments collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • StringLiteralExprSyntax
  • Examples
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SubscriptCallExprSyntax

Structure

SubscriptCallExprSyntax

struct SubscriptCallExprSyntax

SyntaxNodesQRS.swift

Children

  • calledExpression: ExprSyntax

  • leftSquare: ``
    \

  • arguments: [LabeledExprListSyntax
    \

  • rightSquare: ]

  • trailingClosure: ClosureExprSyntax?

  • additionalTrailingClosures: MultipleTrailingClosureElementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, calledExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, leftBracket: TokenSyntax, UnexpectedNodesSyntax?, argumentList: LabeledExprListSyntax, UnexpectedNodesSyntax?, rightBracket: TokenSyntax, UnexpectedNodesSyntax?, trailingClosure: ClosureExprSyntax?, UnexpectedNodesSyntax?, additionalTrailingClosures: MultipleTrailingClosureElementListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, calledExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, leftSquare: TokenSyntax, UnexpectedNodesSyntax?, arguments: LabeledExprListSyntax, UnexpectedNodesSyntax?, rightSquare: TokenSyntax, UnexpectedNodesSyntax?, trailingClosure: ClosureExprSyntax?, UnexpectedNodesSyntax?, additionalTrailingClosures: MultipleTrailingClosureElementListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var additionalTrailingClosures: MultipleTrailingClosureElementListSyntax

var argumentList: LabeledExprListSyntax Deprecated

var arguments: LabeledExprListSyntax

var calledExpression: ExprSyntax

var leftBracket: TokenSyntax Deprecated

var leftSquare: TokenSyntax

var rightBracket: TokenSyntax Deprecated

var rightSquare: TokenSyntax

var trailingClosure: ClosureExprSyntax?

var unexpectedAfterAdditionalTrailingClosures: UnexpectedNodesSyntax?

var unexpectedBeforeCalledExpression: UnexpectedNodesSyntax?

var unexpectedBetweenArgumentListAndRightBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenArgumentsAndRightSquare: UnexpectedNodesSyntax?

var unexpectedBetweenCalledExpressionAndLeftBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenCalledExpressionAndLeftSquare: UnexpectedNodesSyntax?

var unexpectedBetweenLeftBracketAndArgumentList: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftSquareAndArguments: UnexpectedNodesSyntax?

var unexpectedBetweenRightBracketAndTrailingClosure: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenRightSquareAndTrailingClosure: UnexpectedNodesSyntax?

var unexpectedBetweenTrailingClosureAndAdditionalTrailingClosures: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s additionalTrailingClosures collection.

Deprecated

Adds the provided element to the node’s arguments collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • SubscriptCallExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SuperExprSyntax

Structure

SuperExprSyntax

struct SuperExprSyntax

SyntaxNodesQRS.swift

Children

  • superKeyword: super

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, superKeyword: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var superKeyword: TokenSyntax

var unexpectedAfterSuperKeyword: UnexpectedNodesSyntax?

var unexpectedBeforeSuperKeyword: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • SuperExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SwitchExprSyntax

Structure

SwitchExprSyntax

A switch expression.

struct SwitchExprSyntax

SyntaxNodesQRS.swift

Examples

This represents the switch expression in

switch self.foo { }

A switch ecpression may be declared without any cases.

Children

  • switchKeyword: switch

  • subject: ExprSyntax

  • leftBrace: {

  • cases: SwitchCaseListSyntax

  • rightBrace: }

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, switchKeyword: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, leftBrace: TokenSyntax, UnexpectedNodesSyntax?, cases: SwitchCaseListSyntax, UnexpectedNodesSyntax?, rightBrace: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, switchKeyword: TokenSyntax, UnexpectedNodesSyntax?, subject: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, leftBrace: TokenSyntax, UnexpectedNodesSyntax?, cases: SwitchCaseListSyntax, UnexpectedNodesSyntax?, rightBrace: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var cases: SwitchCaseListSyntax

The switch’s body that contains all possible cases.

var expression: ExprSyntax Deprecated

var leftBrace: TokenSyntax

The brace introducing the switch body.

var rightBrace: TokenSyntax

The brace closing the switch body.

var subject: ExprSyntax

The expression to switch over.

var switchKeyword: TokenSyntax

The switch keyword.

var unexpectedAfterRightBrace: UnexpectedNodesSyntax?

var unexpectedBeforeSwitchKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenCasesAndRightBrace: UnexpectedNodesSyntax?

var unexpectedBetweenExpressionAndLeftBrace: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftBraceAndCases: UnexpectedNodesSyntax?

var unexpectedBetweenSubjectAndLeftBrace: UnexpectedNodesSyntax?

var unexpectedBetweenSwitchKeywordAndExpression: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenSwitchKeywordAndSubject: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s cases collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • BracedSyntax
  • ExprSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • SwitchExprSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TernaryExprSyntax

Structure

TernaryExprSyntax

The ternary operator with operator precedences resolved.

struct TernaryExprSyntax

SyntaxNodesTUVWXYZ.swift

Examples

a ? 1 : 0

Children

  • condition: ExprSyntax

  • questionMark: ?

  • thenExpression: ExprSyntax

  • colon: :

  • elseExpression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, condition: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, questionMark: TokenSyntax, UnexpectedNodesSyntax?, thenExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, elseExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, conditionExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, questionMark: TokenSyntax, UnexpectedNodesSyntax?, firstChoice: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, colonMark: TokenSyntax, UnexpectedNodesSyntax?, secondChoice: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var colon: TokenSyntax

var colonMark: TokenSyntax Deprecated

var condition: ExprSyntax

var conditionExpression: ExprSyntax Deprecated

var elseExpression: ExprSyntax

var firstChoice: ExprSyntax Deprecated

var questionMark: TokenSyntax

var secondChoice: ExprSyntax Deprecated

var thenExpression: ExprSyntax

var unexpectedAfterElseExpression: UnexpectedNodesSyntax?

var unexpectedAfterSecondChoice: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeCondition: UnexpectedNodesSyntax?

var unexpectedBeforeConditionExpression: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenColonAndElseExpression: UnexpectedNodesSyntax?

var unexpectedBetweenColonMarkAndSecondChoice: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenConditionAndQuestionMark: UnexpectedNodesSyntax?

var unexpectedBetweenConditionExpressionAndQuestionMark: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenFirstChoiceAndColonMark: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenQuestionMarkAndFirstChoice: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenQuestionMarkAndThenExpression: UnexpectedNodesSyntax?

var unexpectedBetweenThenExpressionAndColon: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • TernaryExprSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TryExprSyntax

Structure

TryExprSyntax

An expression prefixed with try.

struct TryExprSyntax

SyntaxNodesTUVWXYZ.swift

Examples

try foo()

try? foo()

try! foo()

Children

  • tryKeyword: try

  • questionOrExclamationMark: ( ? | !)?

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, tryKeyword: TokenSyntax, UnexpectedNodesSyntax?, questionOrExclamationMark: TokenSyntax?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var expression: ExprSyntax

var questionOrExclamationMark: TokenSyntax?

var tryKeyword: TokenSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeTryKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenQuestionOrExclamationMarkAndExpression: UnexpectedNodesSyntax?

var unexpectedBetweenTryKeywordAndQuestionOrExclamationMark: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • TryExprSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TupleExprSyntax

Structure

TupleExprSyntax

struct TupleExprSyntax

SyntaxNodesTUVWXYZ.swift

Children

  • leftParen: (

  • elements: LabeledExprListSyntax

  • rightParen: )

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftParen: TokenSyntax, UnexpectedNodesSyntax?, elementList: LabeledExprListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftParen: TokenSyntax, UnexpectedNodesSyntax?, elements: LabeledExprListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var elementList: LabeledExprListSyntax Deprecated

var elements: LabeledExprListSyntax

var leftParen: TokenSyntax

var rightParen: TokenSyntax

var unexpectedAfterRightParen: UnexpectedNodesSyntax?

var unexpectedBeforeLeftParen: UnexpectedNodesSyntax?

var unexpectedBetweenElementListAndRightParen: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenElementsAndRightParen: UnexpectedNodesSyntax?

var unexpectedBetweenLeftParenAndElementList: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftParenAndElements: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s elements collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • ParenthesizedSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • TupleExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TypeExprSyntax

Structure

TypeExprSyntax

struct TypeExprSyntax

SyntaxNodesTUVWXYZ.swift

Children

  • type: TypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var type: TypeSyntax

var unexpectedAfterType: UnexpectedNodesSyntax?

var unexpectedBeforeType: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • TypeExprSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • UnresolvedAsExprSyntax

Structure

UnresolvedAsExprSyntax

The as keyword without any operands.

struct UnresolvedAsExprSyntax

SyntaxNodesTUVWXYZ.swift

Overview

Children

  • asKeyword: as

  • questionOrExclamationMark: ( ? | !)?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, asKeyword: TokenSyntax, UnexpectedNodesSyntax?, questionOrExclamationMark: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, asTok: TokenSyntax, UnexpectedNodesSyntax?, questionOrExclamationMark: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var asKeyword: TokenSyntax

var asTok: TokenSyntax Deprecated

var questionOrExclamationMark: TokenSyntax?

var unexpectedAfterQuestionOrExclamationMark: UnexpectedNodesSyntax?

var unexpectedBeforeAsKeyword: UnexpectedNodesSyntax?

var unexpectedBeforeAsTok: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenAsKeywordAndQuestionOrExclamationMark: UnexpectedNodesSyntax?

var unexpectedBetweenAsTokAndQuestionOrExclamationMark: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • UnresolvedAsExprSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • UnresolvedIsExprSyntax

Structure

UnresolvedIsExprSyntax

The is keyword without any operands.

struct UnresolvedIsExprSyntax

SyntaxNodesTUVWXYZ.swift

Overview

Children

  • isKeyword: is

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, isKeyword: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, isTok: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var isKeyword: TokenSyntax

var isTok: TokenSyntax Deprecated

var unexpectedAfterIsKeyword: UnexpectedNodesSyntax?

var unexpectedAfterIsTok: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeIsKeyword: UnexpectedNodesSyntax?

var unexpectedBeforeIsTok: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • UnresolvedIsExprSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • UnresolvedTernaryExprSyntax

Structure

UnresolvedTernaryExprSyntax

The middle section of a ternary operator between ? and :.

struct UnresolvedTernaryExprSyntax

SyntaxNodesTUVWXYZ.swift

Overview

Children

  • questionMark: ?

  • thenExpression: ExprSyntax

  • colon: :

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, questionMark: TokenSyntax, UnexpectedNodesSyntax?, firstChoice: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, colonMark: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, questionMark: TokenSyntax, UnexpectedNodesSyntax?, thenExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var colon: TokenSyntax

var colonMark: TokenSyntax Deprecated

var firstChoice: ExprSyntax Deprecated

var questionMark: TokenSyntax

var thenExpression: ExprSyntax

var unexpectedAfterColon: UnexpectedNodesSyntax?

var unexpectedAfterColonMark: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeQuestionMark: UnexpectedNodesSyntax?

var unexpectedBetweenFirstChoiceAndColonMark: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenQuestionMarkAndFirstChoice: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenQuestionMarkAndThenExpression: UnexpectedNodesSyntax?

var unexpectedBetweenThenExpressionAndColon: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ExprSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Expressions

struct ExprSyntax

protocol ExprSyntaxProtocol

Protocol to which all ExprSyntax nodes conform.

struct MissingExprSyntax

In case the source code is missing an expression, this node stands in place of the missing expression.

struct ArrayExprSyntax

An array literal.

struct ArrowExprSyntax

The arrow when a type is used at a position that syntactically expectes an expression.

struct AsExprSyntax

The cast of an expressison to a different type.

struct AssignmentExprSyntax

struct AwaitExprSyntax

struct BinaryOperatorExprSyntax

An operator like + or -.

struct BooleanLiteralExprSyntax

struct BorrowExprSyntax

struct ClosureExprSyntax

struct ConsumeExprSyntax

struct CopyExprSyntax

struct DeclReferenceExprSyntax

  • UnresolvedTernaryExprSyntax
  • Overview
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • PatternSyntax

Structure

PatternSyntax

struct PatternSyntax

SyntaxBaseNodes.swift

Subtypes

  • ExpressionPatternSyntax

  • IdentifierPatternSyntax

  • IsTypePatternSyntax

  • MissingPatternSyntax

  • TuplePatternSyntax

  • ValueBindingPatternSyntax

  • WildcardPatternSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init?((some PatternSyntaxProtocol)?)

Create a PatternSyntax node from a specialized optional syntax node.

init(some PatternSyntaxProtocol)

Create a PatternSyntax node from a specialized syntax node.

init?(fromProtocol: (any PatternSyntaxProtocol)?)

init(fromProtocol: any PatternSyntaxProtocol)

Instance Methods

Get an enum that can be used to exhaustively switch over all Pattern syntax nodes.

Return the non-type erased version of this syntax node.

Syntax nodes always conform to PatternSyntaxProtocol. This API is just added for consistency.

Deprecated

Type Properties

static var structure: SyntaxNodeStructure

Relationships

Conforms To

  • PatternSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Patterns

protocol PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

struct MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct IsTypePatternSyntax

struct TuplePatternSyntax

A pattern that contains a list of other pattern.

struct ValueBindingPatternSyntax

struct WildcardPatternSyntax

A pattern that represent a wildcard.

  • PatternSyntax
  • Subtypes
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • PatternSyntaxProtocol

Protocol

PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

protocol PatternSyntaxProtocol : SyntaxProtocol

SyntaxBaseNodes.swift

Overview

Extension point to add common methods to all PatternSyntax nodes.

Topics

Instance Methods

Attempts to upcast the current syntax node to its base node type ( PatternSyntax).

Deprecated

Attempts to cast the current syntax node to a given specialized syntax type.

Attempts to cast the current syntax node to a given node type from the a base node protocol hierarchy other than PatternSyntaxProtocol.

Force-upcast the current syntax node to its base node type ( PatternSyntax).

Force-casts the current syntax node to a given node type from a base node protocol hierarchy other than PatternSyntaxProtocol.

Force-casts the current syntax node to a given specialized syntax type.

Checks if the current syntax node can be cast to a given specialized syntax type.

Checks if the current syntax node can be upcast to its base node type ( PatternSyntax).

Checks if the current syntax node can be cast to a given node type from a base node protocol hierarchy other than PatternSyntaxProtocol.

Relationships

Inherits From

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxProtocol

Conforming Types

  • ExpressionPatternSyntax
  • IdentifierPatternSyntax
  • IsTypePatternSyntax
  • MissingPatternSyntax
  • PatternSyntax
  • TuplePatternSyntax
  • ValueBindingPatternSyntax
  • WildcardPatternSyntax

See Also

Patterns

struct PatternSyntax

struct MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct IsTypePatternSyntax

struct TuplePatternSyntax

A pattern that contains a list of other pattern.

struct ValueBindingPatternSyntax

struct WildcardPatternSyntax

A pattern that represent a wildcard.

  • PatternSyntaxProtocol
  • Overview
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • MissingPatternSyntax

Structure

MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct MissingPatternSyntax

SyntaxNodesJKLMN.swift

Topics

Initializers

init()

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, placeholder: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var placeholder: TokenSyntax

var unexpectedAfterPlaceholder: UnexpectedNodesSyntax?

var unexpectedBeforePlaceholder: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • MissingNodeSyntax
  • PatternSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Patterns

struct PatternSyntax

protocol PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

struct ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct IsTypePatternSyntax

struct TuplePatternSyntax

A pattern that contains a list of other pattern.

struct ValueBindingPatternSyntax

struct WildcardPatternSyntax

A pattern that represent a wildcard.

  • MissingPatternSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ExpressionPatternSyntax

Structure

ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct ExpressionPatternSyntax

SyntaxNodesEF.swift

Examples

Patterns can be used in switch cases like the following example:

switch raw.kind { case .expressionPattern: return true default: return false }

Children

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var expression: ExprSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeExpression: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • PatternSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Patterns

struct PatternSyntax

protocol PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

struct MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct IsTypePatternSyntax

struct TuplePatternSyntax

A pattern that contains a list of other pattern.

struct ValueBindingPatternSyntax

struct WildcardPatternSyntax

A pattern that represent a wildcard.

  • ExpressionPatternSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • IdentifierPatternSyntax

Structure

IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct IdentifierPatternSyntax

SyntaxNodesGHI.swift

Examples

IdentifierPatternSyntax can be used in simplple variable declarations. For example a in the exmaple:

let a = 1

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var identifier: TokenSyntax

var unexpectedAfterIdentifier: UnexpectedNodesSyntax?

var unexpectedBeforeIdentifier: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • PatternSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Patterns

struct PatternSyntax

protocol PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

struct MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct IsTypePatternSyntax

struct TuplePatternSyntax

A pattern that contains a list of other pattern.

struct ValueBindingPatternSyntax

struct WildcardPatternSyntax

A pattern that represent a wildcard.

  • IdentifierPatternSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • IsTypePatternSyntax

Structure

IsTypePatternSyntax

struct IsTypePatternSyntax

SyntaxNodesGHI.swift

Children

  • isKeyword: is

  • type: TypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, isKeyword: TokenSyntax, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var isKeyword: TokenSyntax

var type: TypeSyntax

var unexpectedAfterType: UnexpectedNodesSyntax?

var unexpectedBeforeIsKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenIsKeywordAndType: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • PatternSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Patterns

struct PatternSyntax

protocol PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

struct MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct TuplePatternSyntax

A pattern that contains a list of other pattern.

struct ValueBindingPatternSyntax

struct WildcardPatternSyntax

A pattern that represent a wildcard.

  • IsTypePatternSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TuplePatternSyntax

Structure

TuplePatternSyntax

A pattern that contains a list of other pattern.

struct TuplePatternSyntax

SyntaxNodesTUVWXYZ.swift

Examples

TuplePatternSyntax can be used in more complex variable declarations. For example (x, y) in the example:

let (x, y) = (1, 2)

Children

  • leftParen: (

  • elements: TuplePatternElementListSyntax

  • rightParen: )

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftParen: TokenSyntax, UnexpectedNodesSyntax?, elements: TuplePatternElementListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var elements: TuplePatternElementListSyntax

var leftParen: TokenSyntax

The parent introducing the tuple.

var rightParen: TokenSyntax

The paren closing the tuple.

var unexpectedAfterRightParen: UnexpectedNodesSyntax?

var unexpectedBeforeLeftParen: UnexpectedNodesSyntax?

var unexpectedBetweenElementsAndRightParen: UnexpectedNodesSyntax?

var unexpectedBetweenLeftParenAndElements: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s elements collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ParenthesizedSyntax
  • PatternSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Patterns

struct PatternSyntax

protocol PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

struct MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct IsTypePatternSyntax

struct ValueBindingPatternSyntax

struct WildcardPatternSyntax

A pattern that represent a wildcard.

  • TuplePatternSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ValueBindingPatternSyntax

Structure

ValueBindingPatternSyntax

struct ValueBindingPatternSyntax

SyntaxNodesTUVWXYZ.swift

Children

  • bindingSpecifier: ( let | var | inout | _mutating | _borrowing | _consuming | borrowing)

  • pattern: PatternSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, bindingKeyword: TokenSyntax, UnexpectedNodesSyntax?, valuePattern: some PatternSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, bindingSpecifier: TokenSyntax, UnexpectedNodesSyntax?, pattern: some PatternSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var bindingKeyword: TokenSyntax Deprecated

var bindingSpecifier: TokenSyntax

var pattern: PatternSyntax

var unexpectedAfterPattern: UnexpectedNodesSyntax?

var unexpectedAfterValuePattern: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeBindingKeyword: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeBindingSpecifier: UnexpectedNodesSyntax?

var unexpectedBetweenBindingKeywordAndValuePattern: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenBindingSpecifierAndPattern: UnexpectedNodesSyntax?

var valuePattern: PatternSyntax Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • PatternSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Patterns

struct PatternSyntax

protocol PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

struct MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct IsTypePatternSyntax

struct TuplePatternSyntax

A pattern that contains a list of other pattern.

struct WildcardPatternSyntax

A pattern that represent a wildcard.

  • ValueBindingPatternSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • WildcardPatternSyntax

Structure

WildcardPatternSyntax

A pattern that represent a wildcard.

struct WildcardPatternSyntax

SyntaxNodesTUVWXYZ.swift

Examples

WildcardPatternSyntax matches and ignores any value. For example _ in the example:

for _ in 1...3 { // ... }

Children

  • wildcard: _

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, wildcard: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, wildcard: TokenSyntax, UnexpectedNodesSyntax?, typeAnnotation: TypeAnnotationSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var typeAnnotation: TypeAnnotationSyntax? Deprecated

var unexpectedAfterTypeAnnotation: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterWildcard: UnexpectedNodesSyntax?

var unexpectedBeforeWildcard: UnexpectedNodesSyntax?

var unexpectedBetweenWildcardAndTypeAnnotation: UnexpectedNodesSyntax? Deprecated

var wildcard: TokenSyntax

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • PatternSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Patterns

struct PatternSyntax

protocol PatternSyntaxProtocol

Protocol to which all PatternSyntax nodes conform.

struct MissingPatternSyntax

In case the source code is missing a pattern, this node stands in place of the missing pattern.

struct ExpressionPatternSyntax

A pattern that contains an ExprSyntaxProtocol.

struct IdentifierPatternSyntax

A pattern that contains a TokenSyntax.

struct IsTypePatternSyntax

struct TuplePatternSyntax

A pattern that contains a list of other pattern.

struct ValueBindingPatternSyntax

  • WildcardPatternSyntax
  • Examples
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • StmtSyntax

Structure

StmtSyntax

struct StmtSyntax

SyntaxBaseNodes.swift

Subtypes

  • BreakStmtSyntax

  • ContinueStmtSyntax

  • DeferStmtSyntax

  • DiscardStmtSyntax

  • DoStmtSyntax

  • ExpressionStmtSyntax

  • FallThroughStmtSyntax

  • ForStmtSyntax

  • GuardStmtSyntax

  • LabeledStmtSyntax

  • MissingStmtSyntax

  • RepeatStmtSyntax

  • ReturnStmtSyntax

  • ThrowStmtSyntax

  • WhileStmtSyntax

  • YieldStmtSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(some StmtSyntaxProtocol)

Create a StmtSyntax node from a specialized syntax node.

init?((some StmtSyntaxProtocol)?)

Create a StmtSyntax node from a specialized optional syntax node.

init(fromProtocol: any StmtSyntaxProtocol)

init?(fromProtocol: (any StmtSyntaxProtocol)?)

Instance Methods

Get an enum that can be used to exhaustively switch over all Stmt syntax nodes.

Return the non-type erased version of this syntax node.

Syntax nodes always conform to StmtSyntaxProtocol. This API is just added for consistency.

Deprecated

Type Properties

static var structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • StmtSyntax
  • Subtypes
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • StmtSyntaxProtocol

Protocol

StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

protocol StmtSyntaxProtocol : SyntaxProtocol

SyntaxBaseNodes.swift

Overview

Extension point to add common methods to all StmtSyntax nodes.

Topics

Instance Methods

Attempts to cast the current syntax node to a given node type from the a base node protocol hierarchy other than StmtSyntaxProtocol.

Deprecated

Attempts to upcast the current syntax node to its base node type ( StmtSyntax).

Attempts to cast the current syntax node to a given specialized syntax type.

Force-casts the current syntax node to a given node type from a base node protocol hierarchy other than StmtSyntaxProtocol.

Force-casts the current syntax node to a given specialized syntax type.

Force-upcast the current syntax node to its base node type ( StmtSyntax).

Checks if the current syntax node can be upcast to its base node type ( StmtSyntax).

Checks if the current syntax node can be cast to a given node type from a base node protocol hierarchy other than StmtSyntaxProtocol.

Checks if the current syntax node can be cast to a given specialized syntax type.

Relationships

Inherits From

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxProtocol

Conforming Types

  • BreakStmtSyntax
  • ContinueStmtSyntax
  • DeferStmtSyntax
  • DiscardStmtSyntax
  • DoStmtSyntax
  • ExpressionStmtSyntax
  • FallThroughStmtSyntax
  • ForStmtSyntax
  • GuardStmtSyntax
  • LabeledStmtSyntax
  • MissingStmtSyntax
  • RepeatStmtSyntax
  • ReturnStmtSyntax
  • StmtSyntax
  • ThrowStmtSyntax
  • WhileStmtSyntax
  • YieldStmtSyntax

See Also

Statements

struct StmtSyntax

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • StmtSyntaxProtocol
  • Overview
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • MissingStmtSyntax

Structure

MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct MissingStmtSyntax

SyntaxNodesJKLMN.swift

Topics

Initializers

init()

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, placeholder: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var placeholder: TokenSyntax

var unexpectedAfterPlaceholder: UnexpectedNodesSyntax?

var unexpectedBeforePlaceholder: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • MissingNodeSyntax
  • StmtSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • MissingStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • BreakStmtSyntax

Structure

BreakStmtSyntax

struct BreakStmtSyntax

SyntaxNodesAB.swift

Children

  • breakKeyword: break

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, breakKeyword: TokenSyntax, UnexpectedNodesSyntax?, label: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var breakKeyword: TokenSyntax

var label: TokenSyntax?

var unexpectedAfterLabel: UnexpectedNodesSyntax?

var unexpectedBeforeBreakKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenBreakKeywordAndLabel: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • BreakStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ContinueStmtSyntax

Structure

ContinueStmtSyntax

struct ContinueStmtSyntax

SyntaxNodesC.swift

Children

  • continueKeyword: continue

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, continueKeyword: TokenSyntax, UnexpectedNodesSyntax?, label: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var continueKeyword: TokenSyntax

var label: TokenSyntax?

var unexpectedAfterLabel: UnexpectedNodesSyntax?

var unexpectedBeforeContinueKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenContinueKeywordAndLabel: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • ContinueStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DeferStmtSyntax

Structure

DeferStmtSyntax

struct DeferStmtSyntax

SyntaxNodesD.swift

Children

  • deferKeyword: defer

  • body: CodeBlockSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, deferKeyword: TokenSyntax, UnexpectedNodesSyntax?, body: CodeBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var body: CodeBlockSyntax

var deferKeyword: TokenSyntax

var unexpectedAfterBody: UnexpectedNodesSyntax?

var unexpectedBeforeDeferKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenDeferKeywordAndBody: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithCodeBlockSyntax

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • DeferStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DiscardStmtSyntax

Structure

DiscardStmtSyntax

struct DiscardStmtSyntax

SyntaxNodesD.swift

Children

  • discardKeyword: discard

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, discardKeyword: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var discardKeyword: TokenSyntax

var expression: ExprSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeDiscardKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenDiscardKeywordAndExpression: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • DiscardStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DoStmtSyntax

Structure

DoStmtSyntax

struct DoStmtSyntax

SyntaxNodesD.swift

Children

  • doKeyword: do

  • throwsClause: ThrowsClauseSyntax?

  • body: CodeBlockSyntax

  • catchClauses: CatchClauseListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, doKeyword: TokenSyntax, UnexpectedNodesSyntax?, throwsClause: ThrowsClauseSyntax?, UnexpectedNodesSyntax?, body: CodeBlockSyntax, UnexpectedNodesSyntax?, catchClauses: CatchClauseListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var body: CodeBlockSyntax

var catchClauses: CatchClauseListSyntax

var doKeyword: TokenSyntax

var throwsClause: ThrowsClauseSyntax?

The clause specifying the type of errors thrown from the ‘do’ block.

var unexpectedAfterCatchClauses: UnexpectedNodesSyntax?

var unexpectedBeforeDoKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenBodyAndCatchClauses: UnexpectedNodesSyntax?

var unexpectedBetweenDoKeywordAndThrowsClause: UnexpectedNodesSyntax?

var unexpectedBetweenThrowsClauseAndBody: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s catchClauses collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithCodeBlockSyntax

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • DoStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ExpressionStmtSyntax

Structure

ExpressionStmtSyntax

struct ExpressionStmtSyntax

SyntaxNodesEF.swift

Children

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var expression: ExprSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeExpression: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • ExpressionStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |



  • SwiftSyntax
  • ForStmtSyntax

Structure

ForStmtSyntax

struct ForStmtSyntax

SyntaxNodesEF.swift

Children

  • forKeyword: for

  • tryKeyword: try?

  • awaitKeyword: await?

  • caseKeyword: case?

  • pattern: PatternSyntax

  • typeAnnotation: TypeAnnotationSyntax?

  • inKeyword: in

  • sequence: ExprSyntax

  • whereClause: WhereClauseSyntax?

  • body: CodeBlockSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, forKeyword: TokenSyntax, UnexpectedNodesSyntax?, tryKeyword: TokenSyntax?, UnexpectedNodesSyntax?, awaitKeyword: TokenSyntax?, UnexpectedNodesSyntax?, caseKeyword: TokenSyntax?, UnexpectedNodesSyntax?, pattern: some PatternSyntaxProtocol, UnexpectedNodesSyntax?, typeAnnotation: TypeAnnotationSyntax?, UnexpectedNodesSyntax?, inKeyword: TokenSyntax, UnexpectedNodesSyntax?, sequence: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, whereClause: WhereClauseSyntax?, UnexpectedNodesSyntax?, body: CodeBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, forKeyword: TokenSyntax, UnexpectedNodesSyntax?, tryKeyword: TokenSyntax?, UnexpectedNodesSyntax?, awaitKeyword: TokenSyntax?, UnexpectedNodesSyntax?, caseKeyword: TokenSyntax?, UnexpectedNodesSyntax?, pattern: some PatternSyntaxProtocol, UnexpectedNodesSyntax?, typeAnnotation: TypeAnnotationSyntax?, UnexpectedNodesSyntax?, inKeyword: TokenSyntax, UnexpectedNodesSyntax?, sequenceExpr: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, whereClause: WhereClauseSyntax?, UnexpectedNodesSyntax?, body: CodeBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var awaitKeyword: TokenSyntax?

var body: CodeBlockSyntax

var caseKeyword: TokenSyntax?

var forKeyword: TokenSyntax

var inKeyword: TokenSyntax

var pattern: PatternSyntax

var sequence: ExprSyntax

var sequenceExpr: ExprSyntax Deprecated

var tryKeyword: TokenSyntax?

var typeAnnotation: TypeAnnotationSyntax?

var unexpectedAfterBody: UnexpectedNodesSyntax?

var unexpectedBeforeForKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenAwaitKeywordAndCaseKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenCaseKeywordAndPattern: UnexpectedNodesSyntax?

var unexpectedBetweenForKeywordAndTryKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenInKeywordAndSequence: UnexpectedNodesSyntax?

var unexpectedBetweenInKeywordAndSequenceExpr: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenPatternAndTypeAnnotation: UnexpectedNodesSyntax?

var unexpectedBetweenSequenceAndWhereClause: UnexpectedNodesSyntax?

var unexpectedBetweenSequenceExprAndWhereClause: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenTryKeywordAndAwaitKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenTypeAnnotationAndInKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenWhereClauseAndBody: UnexpectedNodesSyntax?

var whereClause: WhereClauseSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithCodeBlockSyntax

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • ForStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • GuardStmtSyntax

Structure

GuardStmtSyntax

struct GuardStmtSyntax

SyntaxNodesGHI.swift

Children

  • guardKeyword: guard

  • conditions: ConditionElementListSyntax

  • elseKeyword: else

  • body: CodeBlockSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, guardKeyword: TokenSyntax, UnexpectedNodesSyntax?, conditions: ConditionElementListSyntax, UnexpectedNodesSyntax?, elseKeyword: TokenSyntax, UnexpectedNodesSyntax?, body: CodeBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var body: CodeBlockSyntax

var conditions: ConditionElementListSyntax

var elseKeyword: TokenSyntax

var guardKeyword: TokenSyntax

var unexpectedAfterBody: UnexpectedNodesSyntax?

var unexpectedBeforeGuardKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenConditionsAndElseKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenElseKeywordAndBody: UnexpectedNodesSyntax?

var unexpectedBetweenGuardKeywordAndConditions: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s conditions collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithCodeBlockSyntax

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • GuardStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • LabeledStmtSyntax

Structure

LabeledStmtSyntax

struct LabeledStmtSyntax

SyntaxNodesJKLMN.swift

Children

  • colon: :

  • statement: StmtSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, label: TokenSyntax, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, statement: some StmtSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, labelName: TokenSyntax, UnexpectedNodesSyntax?, labelColon: TokenSyntax, UnexpectedNodesSyntax?, statement: some StmtSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var colon: TokenSyntax

var label: TokenSyntax

var labelColon: TokenSyntax Deprecated

var labelName: TokenSyntax Deprecated

var statement: StmtSyntax

var unexpectedAfterStatement: UnexpectedNodesSyntax?

var unexpectedBeforeLabel: UnexpectedNodesSyntax?

var unexpectedBeforeLabelName: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenColonAndStatement: UnexpectedNodesSyntax?

var unexpectedBetweenLabelAndColon: UnexpectedNodesSyntax?

var unexpectedBetweenLabelColonAndStatement: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLabelNameAndLabelColon: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • LabeledStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • RepeatStmtSyntax

Structure

RepeatStmtSyntax

struct RepeatStmtSyntax

SyntaxNodesQRS.swift

Children

  • repeatKeyword: repeat

  • body: CodeBlockSyntax

  • whileKeyword: while

  • condition: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, repeatKeyword: TokenSyntax, UnexpectedNodesSyntax?, body: CodeBlockSyntax, UnexpectedNodesSyntax?, whileKeyword: TokenSyntax, UnexpectedNodesSyntax?, condition: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var body: CodeBlockSyntax

var condition: ExprSyntax

var repeatKeyword: TokenSyntax

var unexpectedAfterCondition: UnexpectedNodesSyntax?

var unexpectedBeforeRepeatKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenBodyAndWhileKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenRepeatKeywordAndBody: UnexpectedNodesSyntax?

var unexpectedBetweenWhileKeywordAndCondition: UnexpectedNodesSyntax?

var whileKeyword: TokenSyntax

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithCodeBlockSyntax

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct ReturnStmtSyntax

struct ThrowStmtSyntax

  • RepeatStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ReturnStmtSyntax

Structure

ReturnStmtSyntax

struct ReturnStmtSyntax

SyntaxNodesQRS.swift

Children

  • returnKeyword: return

  • expression: ExprSyntax?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, returnKeyword: TokenSyntax, UnexpectedNodesSyntax?, expression: (some ExprSyntaxProtocol)?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var expression: ExprSyntax?

var returnKeyword: TokenSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeReturnKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenReturnKeywordAndExpression: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ThrowStmtSyntax

  • ReturnStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ThrowStmtSyntax

Structure

ThrowStmtSyntax

struct ThrowStmtSyntax

SyntaxNodesTUVWXYZ.swift

Children

  • throwKeyword: throw

  • expression: ExprSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, throwKeyword: TokenSyntax, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var expression: ExprSyntax

var throwKeyword: TokenSyntax

var unexpectedAfterExpression: UnexpectedNodesSyntax?

var unexpectedBeforeThrowKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenThrowKeywordAndExpression: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

  • ThrowStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • WhileStmtSyntax

Structure

WhileStmtSyntax

struct WhileStmtSyntax

SyntaxNodesTUVWXYZ.swift

Children

  • whileKeyword: while

  • conditions: ConditionElementListSyntax

  • body: CodeBlockSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, whileKeyword: TokenSyntax, UnexpectedNodesSyntax?, conditions: ConditionElementListSyntax, UnexpectedNodesSyntax?, body: CodeBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var body: CodeBlockSyntax

var conditions: ConditionElementListSyntax

var unexpectedAfterBody: UnexpectedNodesSyntax?

var unexpectedBeforeWhileKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenConditionsAndBody: UnexpectedNodesSyntax?

var unexpectedBetweenWhileKeywordAndConditions: UnexpectedNodesSyntax?

var whileKeyword: TokenSyntax

Instance Methods

Adds the provided element to the node’s conditions collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithCodeBlockSyntax

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

  • WhileStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • YieldStmtSyntax

Structure

YieldStmtSyntax

struct YieldStmtSyntax

SyntaxNodesTUVWXYZ.swift

Children

  • yieldKeyword: yield

  • yieldedExpressions: ( YieldedExpressionsClauseSyntax | ExprSyntax)

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, yieldKeyword: TokenSyntax, UnexpectedNodesSyntax?, yieldedExpressions: YieldStmtSyntax.YieldedExpressions, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, yieldKeyword: TokenSyntax, UnexpectedNodesSyntax?, yields: YieldStmtSyntax.YieldedExpressions, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var unexpectedAfterYieldedExpressions: UnexpectedNodesSyntax?

var unexpectedAfterYields: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeYieldKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenYieldKeywordAndYieldedExpressions: UnexpectedNodesSyntax?

var unexpectedBetweenYieldKeywordAndYields: UnexpectedNodesSyntax? Deprecated

var yieldKeyword: TokenSyntax

var yieldedExpressions: YieldStmtSyntax.YieldedExpressions

var yields: YieldStmtSyntax.YieldedExpressions Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum YieldedExpressions

Relationships

Conforms To

  • StmtSyntaxProtocol
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Statements

struct StmtSyntax

protocol StmtSyntaxProtocol

Protocol to which all StmtSyntax nodes conform.

struct MissingStmtSyntax

In case the source code is missing a statement, this node stands in place of the missing statement.

struct BreakStmtSyntax

struct ContinueStmtSyntax

struct DeferStmtSyntax

struct DiscardStmtSyntax

struct DoStmtSyntax

struct ExpressionStmtSyntax

struct FallThroughStmtSyntax

struct ForStmtSyntax

struct GuardStmtSyntax

struct LabeledStmtSyntax

struct RepeatStmtSyntax

struct ReturnStmtSyntax

  • YieldStmtSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TypeSyntax

Structure

TypeSyntax

struct TypeSyntax

SyntaxBaseNodes.swift

Subtypes

  • ArrayTypeSyntax

  • AttributedTypeSyntax

  • ClassRestrictionTypeSyntax

  • CompositionTypeSyntax

  • DictionaryTypeSyntax

  • FunctionTypeSyntax

  • IdentifierTypeSyntax

  • ImplicitlyUnwrappedOptionalTypeSyntax

  • MemberTypeSyntax

  • MetatypeTypeSyntax

  • MissingTypeSyntax

  • NamedOpaqueReturnTypeSyntax

  • OptionalTypeSyntax

  • PackElementTypeSyntax

  • PackExpansionTypeSyntax

  • SomeOrAnyTypeSyntax

  • SuppressedTypeSyntax

  • TupleTypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(some TypeSyntaxProtocol)

Create a TypeSyntax node from a specialized syntax node.

init?((some TypeSyntaxProtocol)?)

Create a TypeSyntax node from a specialized optional syntax node.

init(fromProtocol: any TypeSyntaxProtocol)

init?(fromProtocol: (any TypeSyntaxProtocol)?)

Instance Methods

Get an enum that can be used to exhaustively switch over all Type syntax nodes.

Return the non-type erased version of this syntax node.

Syntax nodes always conform to TypeSyntaxProtocol. This API is just added for consistency.

Deprecated

Type Properties

static var structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • TypeSyntax
  • Subtypes
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TypeSyntaxProtocol

Protocol

TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

protocol TypeSyntaxProtocol : SyntaxProtocol

SyntaxBaseNodes.swift

Overview

Extension point to add common methods to all TypeSyntax nodes.

Topics

Instance Methods

Attempts to cast the current syntax node to a given node type from the a base node protocol hierarchy other than TypeSyntaxProtocol.

Deprecated

Attempts to upcast the current syntax node to its base node type ( TypeSyntax).

Attempts to cast the current syntax node to a given specialized syntax type.

Force-casts the current syntax node to a given specialized syntax type.

Force-upcast the current syntax node to its base node type ( TypeSyntax).

Force-casts the current syntax node to a given node type from a base node protocol hierarchy other than TypeSyntaxProtocol.

Checks if the current syntax node can be cast to a given specialized syntax type.

Checks if the current syntax node can be cast to a given node type from a base node protocol hierarchy other than TypeSyntaxProtocol.

Checks if the current syntax node can be upcast to its base node type ( TypeSyntax).

Relationships

Inherits From

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxProtocol

Conforming Types

  • ArrayTypeSyntax
  • AttributedTypeSyntax
  • ClassRestrictionTypeSyntax
  • CompositionTypeSyntax
  • DictionaryTypeSyntax
  • FunctionTypeSyntax
  • IdentifierTypeSyntax
  • ImplicitlyUnwrappedOptionalTypeSyntax
  • MemberTypeSyntax
  • MetatypeTypeSyntax
  • MissingTypeSyntax
  • NamedOpaqueReturnTypeSyntax
  • OptionalTypeSyntax
  • PackElementTypeSyntax
  • PackExpansionTypeSyntax
  • SomeOrAnyTypeSyntax
  • SuppressedTypeSyntax
  • TupleTypeSyntax
  • TypeSyntax

See Also

Types

struct TypeSyntax

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • TypeSyntaxProtocol
  • Overview
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • MissingTypeSyntax

Structure

MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct MissingTypeSyntax

SyntaxNodesJKLMN.swift

Topics

Initializers

init()

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, placeholder: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var placeholder: TokenSyntax

var unexpectedAfterPlaceholder: UnexpectedNodesSyntax?

var unexpectedBeforePlaceholder: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • MissingNodeSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • MissingTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ArrayTypeSyntax

Structure

ArrayTypeSyntax

struct ArrayTypeSyntax

SyntaxNodesAB.swift

Children

  • leftSquare: ``
    \
  • element: [TypeSyntax
    \
  • rightSquare: ]

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftSquare: TokenSyntax, UnexpectedNodesSyntax?, element: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, rightSquare: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftSquareBracket: TokenSyntax, UnexpectedNodesSyntax?, elementType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, rightSquareBracket: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var element: TypeSyntax

var elementType: TypeSyntax Deprecated

var leftSquare: TokenSyntax

var leftSquareBracket: TokenSyntax Deprecated

var rightSquare: TokenSyntax

var rightSquareBracket: TokenSyntax Deprecated

var unexpectedAfterRightSquare: UnexpectedNodesSyntax?

var unexpectedAfterRightSquareBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeLeftSquare: UnexpectedNodesSyntax?

var unexpectedBeforeLeftSquareBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenElementAndRightSquare: UnexpectedNodesSyntax?

var unexpectedBetweenElementTypeAndRightSquareBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftSquareAndElement: UnexpectedNodesSyntax?

var unexpectedBetweenLeftSquareBracketAndElementType: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • ArrayTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AttributedTypeSyntax

Structure

AttributedTypeSyntax

struct AttributedTypeSyntax

SyntaxNodesAB.swift

Children

  • specifiers: TypeSpecifierListSyntax

  • attributes: AttributeListSyntax

  • baseType: TypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, specifier: TokenSyntax?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, baseType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, specifiers: TypeSpecifierListSyntax, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, baseType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

A list of attributes that can be attached to the type, such as @escaping.

var baseType: TypeSyntax

The type to with the specifiers and attributes are applied.

var specifier: TokenSyntax? Deprecated

var specifiers: TypeSpecifierListSyntax

A list of specifiers that can be attached to the type, such as inout, isolated, or consuming.

var unexpectedAfterBaseType: UnexpectedNodesSyntax?

var unexpectedBeforeSpecifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeSpecifiers: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndBaseType: UnexpectedNodesSyntax?

var unexpectedBetweenSpecifierAndAttributes: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenSpecifiersAndAttributes: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s specifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol
  • WithAttributesSyntax

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • AttributedTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ClassRestrictionTypeSyntax

Structure

ClassRestrictionTypeSyntax

struct ClassRestrictionTypeSyntax

SyntaxNodesC.swift

Children

  • classKeyword: class

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, classKeyword: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var classKeyword: TokenSyntax

var unexpectedAfterClassKeyword: UnexpectedNodesSyntax?

var unexpectedBeforeClassKeyword: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • ClassRestrictionTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CompositionTypeSyntax

Structure

CompositionTypeSyntax

struct CompositionTypeSyntax

SyntaxNodesC.swift

Children

  • elements: CompositionTypeElementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, elements: CompositionTypeElementListSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var elements: CompositionTypeElementListSyntax

var unexpectedAfterElements: UnexpectedNodesSyntax?

var unexpectedBeforeElements: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s elements collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • CompositionTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DictionaryTypeSyntax

Structure

DictionaryTypeSyntax

struct DictionaryTypeSyntax

SyntaxNodesD.swift

Children

  • leftSquare: ``
    \
  • key: [TypeSyntax
    \
  • colon: :
    \
  • value: TypeSyntax
    \
  • rightSquare: ]

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftSquare: TokenSyntax, UnexpectedNodesSyntax?, key: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, value: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, rightSquare: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftSquareBracket: TokenSyntax, UnexpectedNodesSyntax?, keyType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, valueType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, rightSquareBracket: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var colon: TokenSyntax

var key: TypeSyntax

var keyType: TypeSyntax Deprecated

var leftSquare: TokenSyntax

var leftSquareBracket: TokenSyntax Deprecated

var rightSquare: TokenSyntax

var rightSquareBracket: TokenSyntax Deprecated

var unexpectedAfterRightSquare: UnexpectedNodesSyntax?

var unexpectedAfterRightSquareBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeLeftSquare: UnexpectedNodesSyntax?

var unexpectedBeforeLeftSquareBracket: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenColonAndValue: UnexpectedNodesSyntax?

var unexpectedBetweenColonAndValueType: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenKeyAndColon: UnexpectedNodesSyntax?

var unexpectedBetweenKeyTypeAndColon: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftSquareAndKey: UnexpectedNodesSyntax?

var unexpectedBetweenLeftSquareBracketAndKeyType: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenValueAndRightSquare: UnexpectedNodesSyntax?

var unexpectedBetweenValueTypeAndRightSquareBracket: UnexpectedNodesSyntax? Deprecated

var value: TypeSyntax

var valueType: TypeSyntax Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • DictionaryTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • FunctionTypeSyntax

Structure

FunctionTypeSyntax

struct FunctionTypeSyntax

SyntaxNodesEF.swift

Children

  • leftParen: (

  • parameters: TupleTypeElementListSyntax

  • rightParen: )

  • effectSpecifiers: TypeEffectSpecifiersSyntax?

  • returnClause: ReturnClauseSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftParen: TokenSyntax, UnexpectedNodesSyntax?, arguments: TupleTypeElementListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax, UnexpectedNodesSyntax?, effectSpecifiers: TypeEffectSpecifiersSyntax?, UnexpectedNodesSyntax?, output: ReturnClauseSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftParen: TokenSyntax, UnexpectedNodesSyntax?, parameters: TupleTypeElementListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax, UnexpectedNodesSyntax?, effectSpecifiers: TypeEffectSpecifiersSyntax?, UnexpectedNodesSyntax?, returnClause: ReturnClauseSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var arguments: TupleTypeElementListSyntax Deprecated

var effectSpecifiers: TypeEffectSpecifiersSyntax?

var leftParen: TokenSyntax

var output: ReturnClauseSyntax Deprecated

var parameters: TupleTypeElementListSyntax

var returnClause: ReturnClauseSyntax

var rightParen: TokenSyntax

var unexpectedAfterOutput: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterReturnClause: UnexpectedNodesSyntax?

var unexpectedBeforeLeftParen: UnexpectedNodesSyntax?

var unexpectedBetweenArgumentsAndRightParen: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenEffectSpecifiersAndOutput: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenEffectSpecifiersAndReturnClause: UnexpectedNodesSyntax?

var unexpectedBetweenLeftParenAndArguments: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftParenAndParameters: UnexpectedNodesSyntax?

var unexpectedBetweenParametersAndRightParen: UnexpectedNodesSyntax?

var unexpectedBetweenRightParenAndEffectSpecifiers: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s parameters collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ParenthesizedSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • FunctionTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • IdentifierTypeSyntax

Structure

IdentifierTypeSyntax

struct IdentifierTypeSyntax

SyntaxNodesGHI.swift

Children

  • genericArgumentClause: GenericArgumentClauseSyntax?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, genericArgumentClause: GenericArgumentClauseSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var genericArgumentClause: GenericArgumentClauseSyntax?

var name: TokenSyntax

var unexpectedAfterGenericArgumentClause: UnexpectedNodesSyntax?

var unexpectedBeforeName: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndGenericArgumentClause: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • IdentifierTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ImplicitlyUnwrappedOptionalTypeSyntax

Structure

ImplicitlyUnwrappedOptionalTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

SyntaxNodesGHI.swift

Children

  • wrappedType: TypeSyntax

  • exclamationMark: !

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, wrappedType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, exclamationMark: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var exclamationMark: TokenSyntax

var unexpectedAfterExclamationMark: UnexpectedNodesSyntax?

var unexpectedBeforeWrappedType: UnexpectedNodesSyntax?

var unexpectedBetweenWrappedTypeAndExclamationMark: UnexpectedNodesSyntax?

var wrappedType: TypeSyntax

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • ImplicitlyUnwrappedOptionalTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • MemberTypeSyntax

Structure

MemberTypeSyntax

struct MemberTypeSyntax

SyntaxNodesJKLMN.swift

Children

  • baseType: TypeSyntax

  • period: .

  • genericArgumentClause: GenericArgumentClauseSyntax?

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, baseType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, period: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, genericArgumentClause: GenericArgumentClauseSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var baseType: TypeSyntax

var genericArgumentClause: GenericArgumentClauseSyntax?

var name: TokenSyntax

var period: TokenSyntax

var unexpectedAfterGenericArgumentClause: UnexpectedNodesSyntax?

var unexpectedBeforeBaseType: UnexpectedNodesSyntax?

var unexpectedBetweenBaseTypeAndPeriod: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndGenericArgumentClause: UnexpectedNodesSyntax?

var unexpectedBetweenPeriodAndName: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • MemberTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • MetatypeTypeSyntax

Structure

MetatypeTypeSyntax

struct MetatypeTypeSyntax

SyntaxNodesJKLMN.swift

Children

  • baseType: TypeSyntax

  • period: .

  • metatypeSpecifier: ( Type | Protocol)

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, baseType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, period: TokenSyntax, UnexpectedNodesSyntax?, metatypeSpecifier: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, baseType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, period: TokenSyntax, UnexpectedNodesSyntax?, typeOrProtocol: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var baseType: TypeSyntax

var metatypeSpecifier: TokenSyntax

var period: TokenSyntax

var typeOrProtocol: TokenSyntax Deprecated

var unexpectedAfterMetatypeSpecifier: UnexpectedNodesSyntax?

var unexpectedAfterTypeOrProtocol: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeBaseType: UnexpectedNodesSyntax?

var unexpectedBetweenBaseTypeAndPeriod: UnexpectedNodesSyntax?

var unexpectedBetweenPeriodAndMetatypeSpecifier: UnexpectedNodesSyntax?

var unexpectedBetweenPeriodAndTypeOrProtocol: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • MetatypeTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • NamedOpaqueReturnTypeSyntax

Structure

NamedOpaqueReturnTypeSyntax

struct NamedOpaqueReturnTypeSyntax

SyntaxNodesJKLMN.swift

Children

  • genericParameterClause: GenericParameterClauseSyntax

  • type: TypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, genericParameterClause: GenericParameterClauseSyntax, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, genericParameters: GenericParameterClauseSyntax, UnexpectedNodesSyntax?, baseType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var baseType: TypeSyntax Deprecated

var genericParameterClause: GenericParameterClauseSyntax

The parameter clause that defines the generic parameters.

var genericParameters: GenericParameterClauseSyntax Deprecated

var type: TypeSyntax

var unexpectedAfterBaseType: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterType: UnexpectedNodesSyntax?

var unexpectedBeforeGenericParameterClause: UnexpectedNodesSyntax?

var unexpectedBeforeGenericParameters: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenGenericParameterClauseAndType: UnexpectedNodesSyntax?

var unexpectedBetweenGenericParametersAndBaseType: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct OptionalTypeSyntax

struct PackElementTypeSyntax

  • NamedOpaqueReturnTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |




  • SwiftSyntax
  • PackExpansionTypeSyntax

Structure

PackExpansionTypeSyntax

struct PackExpansionTypeSyntax

SyntaxNodesOP.swift

Children

  • repeatKeyword: repeat

  • repetitionPattern: TypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, repeatKeyword: TokenSyntax, UnexpectedNodesSyntax?, patternType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, repeatKeyword: TokenSyntax, UnexpectedNodesSyntax?, repetitionPattern: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var patternType: TypeSyntax Deprecated

var repeatKeyword: TokenSyntax

var repetitionPattern: TypeSyntax

var unexpectedAfterPatternType: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterRepetitionPattern: UnexpectedNodesSyntax?

var unexpectedBeforeRepeatKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenRepeatKeywordAndPatternType: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenRepeatKeywordAndRepetitionPattern: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

  • PackExpansionTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SomeOrAnyTypeSyntax

Structure

SomeOrAnyTypeSyntax

struct SomeOrAnyTypeSyntax

SyntaxNodesQRS.swift

Children

  • someOrAnySpecifier: ( some | any)

  • constraint: TypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, someOrAnySpecifier: TokenSyntax, UnexpectedNodesSyntax?, baseType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, someOrAnySpecifier: TokenSyntax, UnexpectedNodesSyntax?, constraint: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var baseType: TypeSyntax Deprecated

var constraint: TypeSyntax

var someOrAnySpecifier: TokenSyntax

var unexpectedAfterBaseType: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterConstraint: UnexpectedNodesSyntax?

var unexpectedBeforeSomeOrAnySpecifier: UnexpectedNodesSyntax?

var unexpectedBetweenSomeOrAnySpecifierAndBaseType: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenSomeOrAnySpecifierAndConstraint: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

  • SomeOrAnyTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SuppressedTypeSyntax

Structure

SuppressedTypeSyntax

struct SuppressedTypeSyntax

SyntaxNodesQRS.swift

Children

  • type: TypeSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, withoutTilde: TokenSyntax, UnexpectedNodesSyntax?, patternType: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, withoutTilde: TokenSyntax, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var patternType: TypeSyntax Deprecated

var type: TypeSyntax

var unexpectedAfterPatternType: UnexpectedNodesSyntax? Deprecated

var unexpectedAfterType: UnexpectedNodesSyntax?

var unexpectedBeforeWithoutTilde: UnexpectedNodesSyntax?

var unexpectedBetweenWithoutTildeAndPatternType: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenWithoutTildeAndType: UnexpectedNodesSyntax?

var withoutTilde: TokenSyntax

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

  • SuppressedTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • TupleTypeSyntax

Structure

TupleTypeSyntax

struct TupleTypeSyntax

SyntaxNodesTUVWXYZ.swift

Children

  • leftParen: (

  • elements: TupleTypeElementListSyntax

  • rightParen: )

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leftParen: TokenSyntax, UnexpectedNodesSyntax?, elements: TupleTypeElementListSyntax, UnexpectedNodesSyntax?, rightParen: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var elements: TupleTypeElementListSyntax

var leftParen: TokenSyntax

var rightParen: TokenSyntax

var unexpectedAfterRightParen: UnexpectedNodesSyntax?

var unexpectedBeforeLeftParen: UnexpectedNodesSyntax?

var unexpectedBetweenElementsAndRightParen: UnexpectedNodesSyntax?

var unexpectedBetweenLeftParenAndElements: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s elements collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • ParenthesizedSyntax
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • TypeSyntaxProtocol

See Also

Types

struct TypeSyntax

protocol TypeSyntaxProtocol

Protocol to which all TypeSyntax nodes conform.

struct MissingTypeSyntax

In case the source code is missing a type, this node stands in place of the missing type.

struct ArrayTypeSyntax

struct AttributedTypeSyntax

struct ClassRestrictionTypeSyntax

struct CompositionTypeSyntax

struct DictionaryTypeSyntax

struct FunctionTypeSyntax

struct IdentifierTypeSyntax

struct ImplicitlyUnwrappedOptionalTypeSyntax

struct MemberTypeSyntax

struct MetatypeTypeSyntax

struct NamedOpaqueReturnTypeSyntax

struct OptionalTypeSyntax

  • TupleTypeSyntax
  • Children
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SyntaxChildren

Structure

SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildren

SyntaxChildren.swift

Topics

Instance Properties

var endIndex: SyntaxChildrenIndex

The index that’s one after the last element in the collection.

var startIndex: SyntaxChildrenIndex

The index of the first child in this collection.

Instance Methods

The index for the child that’s after the child at index.

The index for the child that’s before the child at index.

Return the index of node within this collection.

Subscripts

The syntax node at the given index

Type Aliases

typealias Element

SyntaxChildren contains Syntax nodes.

typealias Index

SyntaxChildren is indexed by SyntaxChildrenIndex.

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.Sendable
  • Swift.Sequence

See Also

Collections

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • SyntaxChildren
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • SyntaxChildrenIndex

Structure

SyntaxChildrenIndex

An index in a syntax children collection.

struct SyntaxChildrenIndex

SyntaxChildren.swift

Topics

Operators

Returns true if lhs occurs before rhs.

Initializers

init(nilLiteral: ())

Construct the endIndex of a SyntaxChildren collection.

Relationships

Conforms To

  • Swift.Comparable
  • Swift.Equatable
  • Swift.ExpressibleByNilLiteral
  • Swift.Hashable
  • Swift.Sendable

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • SyntaxChildrenIndex
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AccessorDeclListSyntax

Structure

AccessorDeclListSyntax

struct AccessorDeclListSyntax

SyntaxCollections.swift

Children

AccessorDeclSyntax *

Contained in

  • AccessorBlockSyntax. accessors

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • AccessorDeclListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ArrayElementListSyntax

Structure

ArrayElementListSyntax

struct ArrayElementListSyntax

SyntaxCollections.swift

Children

ArrayElementSyntax *

Contained in

  • ArrayExprSyntax. elements

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • ArrayElementListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |



  • SwiftSyntax
  • AttributeListSyntax

Structure

AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeListSyntax

SyntaxCollections.swift

Overview

An element in this collection can either be an attribute itself or an IfConfigDeclSyntax that contains attributes. This is because attributes can be added conditional on compilcation conditions, for example.

#if !DISABLE_DEPRECATIONS @available(*, deprecated) #endif func myFunction() {}

Children

( AttributeSyntax | IfConfigDeclSyntax) *

Contained in

  • AccessorDeclSyntax. attributes

  • ActorDeclSyntax. attributes

  • AssociatedTypeDeclSyntax. attributes

  • AttributedTypeSyntax. attributes

  • ClassDeclSyntax. attributes

  • ClosureParameterSyntax. attributes

  • ClosureSignatureSyntax. attributes

  • DeinitializerDeclSyntax. attributes

  • EditorPlaceholderDeclSyntax. attributes

  • EnumCaseDeclSyntax. attributes

  • EnumDeclSyntax. attributes

  • ExtensionDeclSyntax. attributes

  • FunctionDeclSyntax. attributes

  • FunctionParameterSyntax. attributes

  • GenericParameterSyntax. attributes

  • IfConfigClauseSyntax. elements

  • ImportDeclSyntax. attributes

  • InitializerDeclSyntax. attributes

  • MacroDeclSyntax. attributes

  • MacroExpansionDeclSyntax. attributes

  • MissingDeclSyntax. attributes

  • PrecedenceGroupDeclSyntax. attributes

  • ProtocolDeclSyntax. attributes

  • StructDeclSyntax. attributes

  • SubscriptDeclSyntax. attributes

  • TypeAliasDeclSyntax. attributes

  • VariableDeclSyntax. attributes

Topics

Initializers

init?(some SyntaxProtocol)

Type Properties

static let syntaxKind: SyntaxKind

Enumerations

enum Element

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • AttributeListSyntax
  • Overview
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AttributeSyntax

Structure

AttributeSyntax

An @ attribute.

struct AttributeSyntax

SyntaxNodesAB.swift

Children

  • atSign: @

  • attributeName: TypeSyntax

  • leftParen: (?

  • arguments: ( LabeledExprListSyntax | TokenSyntax | StringLiteralExprSyntax | AvailabilityArgumentListSyntax | SpecializeAttributeArgumentListSyntax | ObjCSelectorPieceListSyntax | ImplementsAttributeArgumentsSyntax | DifferentiableAttributeArgumentsSyntax | DerivativeAttributeArgumentsSyntax | BackDeployedAttributeArgumentsSyntax | ConventionAttributeArgumentsSyntax | ConventionWitnessMethodAttributeArgumentsSyntax | OpaqueReturnTypeOfAttributeArgumentsSyntax | ExposeAttributeArgumentsSyntax | OriginallyDefinedInAttributeArgumentsSyntax | UnderscorePrivateAttributeArgumentsSyntax | DynamicReplacementAttributeArgumentsSyntax | UnavailableFromAsyncAttributeArgumentsSyntax | EffectsAttributeArgumentListSyntax | DocumentationAttributeArgumentListSyntax)?

  • rightParen: )?

Contained in

  • AttributeListSyntax

  • SwitchCaseSyntax. attribute

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, atSign: TokenSyntax, UnexpectedNodesSyntax?, attributeName: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, leftParen: TokenSyntax?, UnexpectedNodesSyntax?, arguments: AttributeSyntax.Arguments?, UnexpectedNodesSyntax?, rightParen: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, atSignToken: TokenSyntax, UnexpectedNodesSyntax?, attributeName: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, leftParen: TokenSyntax?, UnexpectedNodesSyntax?, argument: AttributeSyntax.Arguments?, UnexpectedNodesSyntax?, rightParen: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var argument: AttributeSyntax.Arguments? Deprecated

var arguments: AttributeSyntax.Arguments?

The arguments of the attribute.

var atSign: TokenSyntax

The @ sign.

var atSignToken: TokenSyntax Deprecated

var attributeName: TypeSyntax

The name of the attribute.

var leftParen: TokenSyntax?

If the attribute takes arguments, the opening parenthesis.

var rightParen: TokenSyntax?

If the attribute takes arguments, the closing parenthesis.

var unexpectedAfterRightParen: UnexpectedNodesSyntax?

var unexpectedBeforeAtSign: UnexpectedNodesSyntax?

var unexpectedBeforeAtSignToken: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenArgumentAndRightParen: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenArgumentsAndRightParen: UnexpectedNodesSyntax?

var unexpectedBetweenAtSignAndAttributeName: UnexpectedNodesSyntax?

var unexpectedBetweenAtSignTokenAndAttributeName: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenAttributeNameAndLeftParen: UnexpectedNodesSyntax?

var unexpectedBetweenLeftParenAndArgument: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenLeftParenAndArguments: UnexpectedNodesSyntax?

Type Aliases

typealias Argument Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Arguments

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • AttributeSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AvailabilityArgumentListSyntax

Structure

AvailabilityArgumentListSyntax

struct AvailabilityArgumentListSyntax

SyntaxCollections.swift

Children

AvailabilityArgumentSyntax *

Contained in

  • AttributeSyntax. arguments

  • AvailabilityConditionSyntax. availabilityArguments

  • SpecializeAvailabilityArgumentSyntax. availabilityArguments

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • AvailabilityArgumentListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • AvailabilityArgumentSyntax

Structure

AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct AvailabilityArgumentSyntax

SyntaxNodesAB.swift

Children

  • trailingComma: ,?

Contained in

  • AvailabilityArgumentListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, argument: AvailabilityArgumentSyntax.Argument, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, entry: AvailabilityArgumentSyntax.Argument, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var argument: AvailabilityArgumentSyntax.Argument

The actual argument.

var entry: AvailabilityArgumentSyntax.Argument Deprecated

var trailingComma: TokenSyntax?

A trailing comma if the argument is followed by another argument.

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeArgument: UnexpectedNodesSyntax?

var unexpectedBeforeEntry: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenArgumentAndTrailingComma: UnexpectedNodesSyntax?

var unexpectedBetweenEntryAndTrailingComma: UnexpectedNodesSyntax? Deprecated

Type Aliases

typealias Entry Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Argument

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • AvailabilityArgumentSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CatchClauseListSyntax

Structure

CatchClauseListSyntax

struct CatchClauseListSyntax

SyntaxCollections.swift

Children

CatchClauseSyntax *

Contained in

  • DoStmtSyntax. catchClauses

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • CatchClauseListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CatchClauseSyntax

Structure

CatchClauseSyntax

struct CatchClauseSyntax

SyntaxNodesC.swift

Children

  • catchKeyword: catch

  • catchItems: CatchItemListSyntax

  • body: CodeBlockSyntax

Contained in

  • CatchClauseListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, catchKeyword: TokenSyntax, UnexpectedNodesSyntax?, catchItems: CatchItemListSyntax, UnexpectedNodesSyntax?, body: CodeBlockSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var body: CodeBlockSyntax

var catchItems: CatchItemListSyntax

var catchKeyword: TokenSyntax

var unexpectedAfterBody: UnexpectedNodesSyntax?

var unexpectedBeforeCatchKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenCatchItemsAndBody: UnexpectedNodesSyntax?

var unexpectedBetweenCatchKeywordAndCatchItems: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s catchItems collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithCodeBlockSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • CatchClauseSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CatchItemListSyntax

Structure

CatchItemListSyntax

struct CatchItemListSyntax

SyntaxCollections.swift

Children

CatchItemSyntax *

Contained in

  • CatchClauseSyntax. catchItems

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • CatchItemListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CatchItemSyntax

Structure

CatchItemSyntax

struct CatchItemSyntax

SyntaxNodesC.swift

Children

  • pattern: PatternSyntax?

  • whereClause: WhereClauseSyntax?

  • trailingComma: ,?

Contained in

  • CatchItemListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, pattern: (some PatternSyntaxProtocol)?, UnexpectedNodesSyntax?, whereClause: WhereClauseSyntax?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var pattern: PatternSyntax?

var trailingComma: TokenSyntax?

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforePattern: UnexpectedNodesSyntax?

var unexpectedBetweenPatternAndWhereClause: UnexpectedNodesSyntax?

var unexpectedBetweenWhereClauseAndTrailingComma: UnexpectedNodesSyntax?

var whereClause: WhereClauseSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • CatchItemSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ClosureCaptureListSyntax

Structure

ClosureCaptureListSyntax

struct ClosureCaptureListSyntax

SyntaxCollections.swift

Children

ClosureCaptureSyntax *

Contained in

  • ClosureCaptureClauseSyntax. items

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureSyntax

struct ClosureParameterListSyntax

  • ClosureCaptureListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ClosureCaptureSyntax

Structure

ClosureCaptureSyntax

struct ClosureCaptureSyntax

SyntaxNodesC.swift

Children

  • specifier: ClosureCaptureSpecifierSyntax?

  • initializer: InitializerClauseSyntax?

  • trailingComma: ,?

Contained in

  • ClosureCaptureListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, specifier: ClosureCaptureSpecifierSyntax?, UnexpectedNodesSyntax?, name: TokenSyntax?, UnexpectedNodesSyntax?, equal: TokenSyntax?, UnexpectedNodesSyntax?, expression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, specifier: ClosureCaptureSpecifierSyntax?, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, initializer: InitializerClauseSyntax?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, specifier: ClosureCaptureSpecifierSyntax?, name: TokenSyntax, equal: TokenSyntax, expression: some ExprSyntaxProtocol, trailingComma: TokenSyntax?, trailingTrivia: Trivia?)

Creates a ClosureCaptureSyntax with a name, and automatically adds an equal token to it since the name is non-optional.

Deprecated

Instance Properties

var assignToken: TokenSyntax? Deprecated

var equal: TokenSyntax? Deprecated

var expression: ExprSyntax Deprecated

var initializer: InitializerClauseSyntax?

var name: TokenSyntax

var specifier: ClosureCaptureSpecifierSyntax?

var trailingComma: TokenSyntax?

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeSpecifier: UnexpectedNodesSyntax?

var unexpectedBetweenAssignTokenAndExpression: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenEqualAndExpression: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenExpressionAndTrailingComma: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenInitializerAndTrailingComma: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndAssignToken: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenNameAndEqual: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenNameAndInitializer: UnexpectedNodesSyntax?

var unexpectedBetweenSpecifierAndName: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureParameterListSyntax

  • ClosureCaptureSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ClosureParameterListSyntax

Structure

ClosureParameterListSyntax

struct ClosureParameterListSyntax

SyntaxCollections.swift

Children

ClosureParameterSyntax *

Contained in

  • ClosureParameterClauseSyntax. parameters

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • ClosureParameterListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ClosureParameterSyntax

Structure

ClosureParameterSyntax

struct ClosureParameterSyntax

SyntaxNodesC.swift

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • colon: :?

  • type: TypeSyntax?

  • ellipsis: ...?

  • trailingComma: ,?

Contained in

  • ClosureParameterListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, firstName: TokenSyntax, UnexpectedNodesSyntax?, secondName: TokenSyntax?, UnexpectedNodesSyntax?, colon: TokenSyntax?, UnexpectedNodesSyntax?, type: (some TypeSyntaxProtocol)?, UnexpectedNodesSyntax?, ellipsis: TokenSyntax?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

var colon: TokenSyntax?

The colon separating the parameter’s name and type.

var ellipsis: TokenSyntax?

If the parameter is variadic, ... to indicate that.

var firstName: TokenSyntax

The label of this parameter that will be used when the closure is called.

var modifiers: DeclModifierListSyntax

var secondName: TokenSyntax?

If this is specified, it is the name by which the parameter can be referenced inside the closure body. If it is nil, the closure parameter is referenced by the first name.

var trailingComma: TokenSyntax?

If the parameter is followed by another parameter, the comma separating them.

var type: TypeSyntax?

The type of the parameter.

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenColonAndType: UnexpectedNodesSyntax?

var unexpectedBetweenEllipsisAndTrailingComma: UnexpectedNodesSyntax?

var unexpectedBetweenFirstNameAndSecondName: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndFirstName: UnexpectedNodesSyntax?

var unexpectedBetweenSecondNameAndColon: UnexpectedNodesSyntax?

var unexpectedBetweenTypeAndEllipsis: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • ClosureParameterSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ClosureShorthandParameterListSyntax

Structure

ClosureShorthandParameterListSyntax

A list of closure parameters that are not parenthesized and don’t have type annotations.

struct ClosureShorthandParameterListSyntax

SyntaxCollections.swift

Overview

If the closure parameters are parenthesized, they can also carry type annotations. In that case, the closure parameters are represented by ClosureParameterListSyntax.

Examples

let closure = { a, b in return a + b }

Children

ClosureShorthandParameterSyntax *

Contained in

  • ClosureSignatureSyntax. parameterClause

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • ClosureShorthandParameterListSyntax
  • Overview
  • Examples
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ClosureShorthandParameterSyntax

Structure

ClosureShorthandParameterSyntax

struct ClosureShorthandParameterSyntax

SyntaxNodesC.swift

Children

  • trailingComma: ,?

Contained in

  • ClosureShorthandParameterListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var name: TokenSyntax

var trailingComma: TokenSyntax?

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeName: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndTrailingComma: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • ClosureShorthandParameterSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CodeBlockItemListSyntax

Structure

CodeBlockItemListSyntax

struct CodeBlockItemListSyntax

SyntaxCollections.swift

Children

CodeBlockItemSyntax *

Contained in

  • AccessorBlockSyntax. accessors

  • ClosureExprSyntax. statements

  • CodeBlockSyntax. statements

  • IfConfigClauseSyntax. elements

  • SourceFileSyntax. statements

  • SwitchCaseSyntax. statements

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • CodeBlockItemListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CodeBlockItemSyntax

Structure

CodeBlockItemSyntax

A CodeBlockItem is any Syntax node that appears on its own line inside a CodeBlock.

struct CodeBlockItemSyntax

SyntaxNodesC.swift

Children

  • item: ( DeclSyntax | StmtSyntax | ExprSyntax)

  • semicolon: ;?

Contained in

  • CodeBlockItemListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, item: CodeBlockItemSyntax.Item, UnexpectedNodesSyntax?, semicolon: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var item: CodeBlockItemSyntax.Item

The underlying node inside the code block.

var semicolon: TokenSyntax?

If present, the trailing semicolon at the end of the item.

var unexpectedAfterSemicolon: UnexpectedNodesSyntax?

var unexpectedBeforeItem: UnexpectedNodesSyntax?

var unexpectedBetweenItemAndSemicolon: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Item

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • CodeBlockItemSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CompositionTypeElementListSyntax

Structure

CompositionTypeElementListSyntax

struct CompositionTypeElementListSyntax

SyntaxCollections.swift

Children

CompositionTypeElementSyntax *

Contained in

  • CompositionTypeSyntax. elements

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • CompositionTypeElementListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • CompositionTypeElementSyntax

Structure

CompositionTypeElementSyntax

struct CompositionTypeElementSyntax

SyntaxNodesC.swift

Children

  • type: TypeSyntax

  • ampersand: TokenSyntax?

Contained in

  • CompositionTypeElementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, ampersand: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var ampersand: TokenSyntax?

var type: TypeSyntax

var unexpectedAfterAmpersand: UnexpectedNodesSyntax?

var unexpectedBeforeType: UnexpectedNodesSyntax?

var unexpectedBetweenTypeAndAmpersand: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • CompositionTypeElementSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ConditionElementListSyntax

Structure

ConditionElementListSyntax

struct ConditionElementListSyntax

SyntaxCollections.swift

Children

ConditionElementSyntax *

Contained in

  • GuardStmtSyntax. conditions

  • IfExprSyntax. conditions

  • WhileStmtSyntax. conditions

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • ConditionElementListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ConditionElementSyntax

Structure

ConditionElementSyntax

struct ConditionElementSyntax

SyntaxNodesC.swift

Children

  • condition: ( ExprSyntax | AvailabilityConditionSyntax | MatchingPatternConditionSyntax | OptionalBindingConditionSyntax)

  • trailingComma: ,?

Contained in

  • ConditionElementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, condition: ConditionElementSyntax.Condition, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var condition: ConditionElementSyntax.Condition

var trailingComma: TokenSyntax?

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeCondition: UnexpectedNodesSyntax?

var unexpectedBetweenConditionAndTrailingComma: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Condition

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • ConditionElementSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DeclModifierListSyntax

Structure

DeclModifierListSyntax

struct DeclModifierListSyntax

SyntaxCollections.swift

Children

DeclModifierSyntax *

Contained in

  • ActorDeclSyntax. modifiers

  • AssociatedTypeDeclSyntax. modifiers

  • ClassDeclSyntax. modifiers

  • ClosureParameterSyntax. modifiers

  • DeinitializerDeclSyntax. modifiers

  • EditorPlaceholderDeclSyntax. modifiers

  • EnumCaseDeclSyntax. modifiers

  • EnumCaseParameterSyntax. modifiers

  • EnumDeclSyntax. modifiers

  • ExtensionDeclSyntax. modifiers

  • FunctionDeclSyntax. modifiers

  • FunctionParameterSyntax. modifiers

  • ImportDeclSyntax. modifiers

  • InitializerDeclSyntax. modifiers

  • MacroDeclSyntax. modifiers

  • MacroExpansionDeclSyntax. modifiers

  • MissingDeclSyntax. modifiers

  • PrecedenceGroupDeclSyntax. modifiers

  • ProtocolDeclSyntax. modifiers

  • StructDeclSyntax. modifiers

  • SubscriptDeclSyntax. modifiers

  • TypeAliasDeclSyntax. modifiers

  • VariableDeclSyntax. modifiers

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DeclModifierListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DeclModifierSyntax

Structure

DeclModifierSyntax

struct DeclModifierSyntax

SyntaxNodesD.swift

Children

  • name: ( __consuming | __setter_access | _const | _local | actor | async | borrowing | class | consuming | convenience | distributed | dynamic | fileprivate | final | indirect | infix | internal | isolated | lazy | mutating | nonisolated | nonmutating | open | optional | override | package | postfix | prefix | private | public | reasync | required | static | unowned | weak | sending)

  • detail: DeclModifierDetailSyntax?

Contained in

  • AccessorDeclSyntax. modifier

  • DeclModifierListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, detail: DeclModifierDetailSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var detail: DeclModifierDetailSyntax?

var name: TokenSyntax

var unexpectedAfterDetail: UnexpectedNodesSyntax?

var unexpectedBeforeName: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndDetail: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DeclModifierSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DeclNameArgumentListSyntax

Structure

DeclNameArgumentListSyntax

struct DeclNameArgumentListSyntax

SyntaxCollections.swift

Children

DeclNameArgumentSyntax *

Contained in

  • DeclNameArgumentsSyntax. arguments

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DeclNameArgumentListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DeclNameArgumentSyntax

Structure

DeclNameArgumentSyntax

struct DeclNameArgumentSyntax

SyntaxNodesD.swift

Children

  • name: TokenSyntax

  • colon: :

Contained in

  • DeclNameArgumentListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var colon: TokenSyntax

var name: TokenSyntax

var unexpectedAfterColon: UnexpectedNodesSyntax?

var unexpectedBeforeName: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndColon: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DeclNameArgumentSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DesignatedTypeListSyntax

Structure

DesignatedTypeListSyntax

struct DesignatedTypeListSyntax

SyntaxCollections.swift

Children

DesignatedTypeSyntax *

Contained in

  • OperatorPrecedenceAndTypesSyntax. designatedTypes

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DesignatedTypeListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DesignatedTypeSyntax

Structure

DesignatedTypeSyntax

struct DesignatedTypeSyntax

SyntaxNodesD.swift

Children

  • leadingComma: ,

  • name: TokenSyntax

Contained in

  • DesignatedTypeListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, leadingComma: TokenSyntax, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var leadingComma: TokenSyntax

var name: TokenSyntax

var unexpectedAfterName: UnexpectedNodesSyntax?

var unexpectedBeforeLeadingComma: UnexpectedNodesSyntax?

var unexpectedBetweenLeadingCommaAndName: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DesignatedTypeSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DictionaryElementListSyntax

Structure

DictionaryElementListSyntax

struct DictionaryElementListSyntax

SyntaxCollections.swift

Children

DictionaryElementSyntax *

Contained in

  • DictionaryExprSyntax. content

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DictionaryElementListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DictionaryElementSyntax

Structure

DictionaryElementSyntax

An element inside a dictionary literal.

struct DictionaryElementSyntax

SyntaxNodesD.swift

Children

  • key: ExprSyntax

  • colon: :

  • value: ExprSyntax

  • trailingComma: ,?

Contained in

  • DictionaryElementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, key: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, value: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, keyExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, valueExpression: some ExprSyntaxProtocol, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var colon: TokenSyntax

var key: ExprSyntax

var keyExpression: ExprSyntax Deprecated

var trailingComma: TokenSyntax?

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeKey: UnexpectedNodesSyntax?

var unexpectedBeforeKeyExpression: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenColonAndValue: UnexpectedNodesSyntax?

var unexpectedBetweenColonAndValueExpression: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenKeyAndColon: UnexpectedNodesSyntax?

var unexpectedBetweenKeyExpressionAndColon: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenValueAndTrailingComma: UnexpectedNodesSyntax?

var unexpectedBetweenValueExpressionAndTrailingComma: UnexpectedNodesSyntax? Deprecated

var value: ExprSyntax

var valueExpression: ExprSyntax Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DictionaryElementSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DifferentiabilityArgumentListSyntax

Structure

DifferentiabilityArgumentListSyntax

struct DifferentiabilityArgumentListSyntax

SyntaxCollections.swift

Children

DifferentiabilityArgumentSyntax *

Contained in

  • DifferentiabilityArgumentsSyntax. arguments

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DifferentiabilityArgumentListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DifferentiabilityArgumentSyntax

Structure

DifferentiabilityArgumentSyntax

A differentiability argument: either the “self” identifier, a function parameter name, or a function parameter index.

struct DifferentiabilityArgumentSyntax

SyntaxNodesD.swift

Children

  • trailingComma: ,?

Contained in

  • DifferentiabilityArgumentListSyntax

  • DifferentiabilityWithRespectToArgumentSyntax. arguments

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, argument: TokenSyntax, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, parameter: TokenSyntax, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var argument: TokenSyntax

var parameter: TokenSyntax Deprecated

var trailingComma: TokenSyntax?

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeArgument: UnexpectedNodesSyntax?

var unexpectedBeforeParameter: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenArgumentAndTrailingComma: UnexpectedNodesSyntax?

var unexpectedBetweenParameterAndTrailingComma: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DifferentiabilityArgumentSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DocumentationAttributeArgumentListSyntax

Structure

DocumentationAttributeArgumentListSyntax

The arguments of the ‘@_documentation’ attribute

struct DocumentationAttributeArgumentListSyntax

SyntaxCollections.swift

Children

DocumentationAttributeArgumentSyntax *

Contained in

  • AttributeSyntax. arguments

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DocumentationAttributeArgumentListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • DocumentationAttributeArgumentSyntax

Structure

DocumentationAttributeArgumentSyntax

struct DocumentationAttributeArgumentSyntax

SyntaxNodesD.swift

Children

  • label: ( visibility | metadata)

  • colon: :

  • trailingComma: ,?

Contained in

  • DocumentationAttributeArgumentListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, label: TokenSyntax, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, value: DocumentationAttributeArgumentSyntax.Value, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var colon: TokenSyntax

var label: TokenSyntax

var trailingComma: TokenSyntax?

A trailing comma if this argument is followed by another one

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeLabel: UnexpectedNodesSyntax?

var unexpectedBetweenColonAndValue: UnexpectedNodesSyntax?

var unexpectedBetweenLabelAndColon: UnexpectedNodesSyntax?

var unexpectedBetweenValueAndTrailingComma: UnexpectedNodesSyntax?

var value: DocumentationAttributeArgumentSyntax.Value

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Value

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • DocumentationAttributeArgumentSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • EffectsAttributeArgumentListSyntax

Structure

EffectsAttributeArgumentListSyntax

The arguments of the ‘@_effects’ attribute. These will be parsed during the SIL stage.

struct EffectsAttributeArgumentListSyntax

SyntaxCollections.swift

Children

TokenSyntax *

Contained in

  • AttributeSyntax. arguments

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • EffectsAttributeArgumentListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • EnumCaseElementListSyntax

Structure

EnumCaseElementListSyntax

A collection of 0 or more EnumCaseElementSyntax s.

struct EnumCaseElementListSyntax

SyntaxCollections.swift

Children

EnumCaseElementSyntax *

Contained in

  • EnumCaseDeclSyntax. elements

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • EnumCaseElementListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • EnumCaseElementSyntax

Structure

EnumCaseElementSyntax

An element of an enum case, containing the name of the case and, optionally, either associated values or an assignment to a raw value.

struct EnumCaseElementSyntax

SyntaxNodesEF.swift

Children

  • parameterClause: EnumCaseParameterClauseSyntax?

  • rawValue: InitializerClauseSyntax?

  • trailingComma: ,?

Contained in

  • EnumCaseElementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, identifier: TokenSyntax, UnexpectedNodesSyntax?, associatedValue: EnumCaseParameterClauseSyntax?, UnexpectedNodesSyntax?, rawValue: InitializerClauseSyntax?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, parameterClause: EnumCaseParameterClauseSyntax?, UnexpectedNodesSyntax?, rawValue: InitializerClauseSyntax?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var associatedValue: EnumCaseParameterClauseSyntax? Deprecated

var identifier: TokenSyntax Deprecated

var name: TokenSyntax

The name of this case.

var parameterClause: EnumCaseParameterClauseSyntax?

The set of associated values of the case.

var rawValue: InitializerClauseSyntax?

The raw value of this enum element, if present.

var trailingComma: TokenSyntax?

The trailing comma of this element, if the case has multiple elements.

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeIdentifier: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeName: UnexpectedNodesSyntax?

var unexpectedBetweenAssociatedValueAndRawValue: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenIdentifierAndAssociatedValue: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenNameAndParameterClause: UnexpectedNodesSyntax?

var unexpectedBetweenParameterClauseAndRawValue: UnexpectedNodesSyntax?

var unexpectedBetweenRawValueAndTrailingComma: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • EnumCaseElementSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • EnumCaseParameterListSyntax

Structure

EnumCaseParameterListSyntax

struct EnumCaseParameterListSyntax

SyntaxCollections.swift

Children

EnumCaseParameterSyntax *

Contained in

  • EnumCaseParameterClauseSyntax. parameters

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • EnumCaseParameterListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • EnumCaseParameterSyntax

Structure

EnumCaseParameterSyntax

struct EnumCaseParameterSyntax

SyntaxNodesEF.swift

Children

  • modifiers: DeclModifierListSyntax

  • colon: :?

  • type: TypeSyntax

  • defaultValue: InitializerClauseSyntax?

  • trailingComma: ,?

Contained in

  • EnumCaseParameterListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, firstName: TokenSyntax?, UnexpectedNodesSyntax?, secondName: TokenSyntax?, UnexpectedNodesSyntax?, colon: TokenSyntax?, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, defaultArgument: InitializerClauseSyntax?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, firstName: TokenSyntax?, UnexpectedNodesSyntax?, secondName: TokenSyntax?, UnexpectedNodesSyntax?, colon: TokenSyntax?, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, defaultValue: InitializerClauseSyntax?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, modifiers: DeclModifierListSyntax, firstName: TokenSyntax, secondName: TokenSyntax?, colon: TokenSyntax, type: some TypeSyntaxProtocol, defaultValue: InitializerClauseSyntax?, trailingComma: TokenSyntax?, trailingTrivia: Trivia?)

Creates an EnumCaseParameterSyntax with a firstName, and automatically adds a colon to it.

Instance Properties

var colon: TokenSyntax?

If the parameter has a label, the colon separating the label from the type.

var defaultArgument: InitializerClauseSyntax? Deprecated

var defaultValue: InitializerClauseSyntax?

If the parameter has a default value, the initializer clause describing the default value.

var firstName: TokenSyntax?

var modifiers: DeclModifierListSyntax

var secondName: TokenSyntax?

var trailingComma: TokenSyntax?

If the parameter is followed by another parameter, the comma separating them.

var type: TypeSyntax

The parameter’s type.

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenColonAndType: UnexpectedNodesSyntax?

var unexpectedBetweenDefaultArgumentAndTrailingComma: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenDefaultValueAndTrailingComma: UnexpectedNodesSyntax?

var unexpectedBetweenFirstNameAndSecondName: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndFirstName: UnexpectedNodesSyntax?

var unexpectedBetweenSecondNameAndColon: UnexpectedNodesSyntax?

var unexpectedBetweenTypeAndDefaultArgument: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenTypeAndDefaultValue: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s modifiers collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithModifiersSyntax
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • EnumCaseParameterSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ExprListSyntax

Structure

ExprListSyntax

A list of expressions connected by operators. This list is contained by a SequenceExprSyntax.

struct ExprListSyntax

SyntaxCollections.swift

Children

ExprSyntax *

Contained in

  • SequenceExprSyntax. elements

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • ExprListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • FunctionParameterListSyntax

Structure

FunctionParameterListSyntax

A list of function parameters that are type annotated and a label. The function parameters are represented by FunctionParameterListSyntax.

struct FunctionParameterListSyntax

SyntaxCollections.swift

Example

func foo(bar: Int, baz: Int) {

}

Children

FunctionParameterSyntax *

Contained in

  • FunctionParameterClauseSyntax. parameters

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • FunctionParameterListSyntax
  • Example
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • FunctionParameterSyntax

Structure

FunctionParameterSyntax

A function parameter

struct FunctionParameterSyntax

SyntaxNodesEF.swift

Children

  • attributes: AttributeListSyntax

  • modifiers: DeclModifierListSyntax

  • colon: :

  • type: TypeSyntax

  • ellipsis: ...?

  • defaultValue: InitializerClauseSyntax?

  • trailingComma: ,?

Contained in

  • FunctionParameterListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, firstName: TokenSyntax, UnexpectedNodesSyntax?, secondName: TokenSyntax?, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, ellipsis: TokenSyntax?, UnexpectedNodesSyntax?, defaultArgument: InitializerClauseSyntax?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, modifiers: DeclModifierListSyntax, UnexpectedNodesSyntax?, firstName: TokenSyntax, UnexpectedNodesSyntax?, secondName: TokenSyntax?, UnexpectedNodesSyntax?, colon: TokenSyntax, UnexpectedNodesSyntax?, type: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, ellipsis: TokenSyntax?, UnexpectedNodesSyntax?, defaultValue: InitializerClauseSyntax?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

Attributes that are attached to the parameter.

var colon: TokenSyntax

The colon separating the label from the type.

var defaultArgument: InitializerClauseSyntax? Deprecated

var defaultValue: InitializerClauseSyntax?

If the parameter has a default value, the expression describing the default value.

var ellipsis: TokenSyntax?

If the parameter is variadic, ... to indicate that.

var firstName: TokenSyntax

The label of this parameter that will be used when the function is called.

var modifiers: DeclModifierListSyntax

Modifiers that are attached to the parameter.

var secondName: TokenSyntax?

If this is specified, it is the name by which the parameter can be referenced inside the function body.

var trailingComma: TokenSyntax?

If the parameter is followed by another parameter, the comma separating them.

var type: TypeSyntax

The parameter’s type.

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndModifiers: UnexpectedNodesSyntax?

var unexpectedBetweenColonAndType: UnexpectedNodesSyntax?

var unexpectedBetweenDefaultArgumentAndTrailingComma: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenDefaultValueAndTrailingComma: UnexpectedNodesSyntax?

var unexpectedBetweenEllipsisAndDefaultArgument: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenEllipsisAndDefaultValue: UnexpectedNodesSyntax?

var unexpectedBetweenFirstNameAndSecondName: UnexpectedNodesSyntax?

var unexpectedBetweenModifiersAndFirstName: UnexpectedNodesSyntax?

var unexpectedBetweenSecondNameAndColon: UnexpectedNodesSyntax?

var unexpectedBetweenTypeAndEllipsis: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Adds the provided element to the node’s modifiers collection.

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithModifiersSyntax
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • FunctionParameterSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • GenericArgumentListSyntax

Structure

GenericArgumentListSyntax

struct GenericArgumentListSyntax

SyntaxCollections.swift

Children

GenericArgumentSyntax *

Contained in

  • GenericArgumentClauseSyntax. arguments

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • GenericArgumentListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • GenericArgumentSyntax

Structure

GenericArgumentSyntax

struct GenericArgumentSyntax

SyntaxNodesGHI.swift

Children

  • argument: ( TypeSyntax | ExprSyntax)

  • trailingComma: ,?

Contained in

  • GenericArgumentListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, argument: some TypeSyntaxProtocol, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, argument: GenericArgumentSyntax.Argument, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, argumentType: GenericArgumentSyntax.Argument, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

Instance Properties

var argument: GenericArgumentSyntax.Argument

The argument type for a generic argument. This can either be a regular type argument or an expression for value generics.

var argumentType: GenericArgumentSyntax.Argument Deprecated

var trailingComma: TokenSyntax?

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeArgument: UnexpectedNodesSyntax?

var unexpectedBeforeArgumentType: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenArgumentAndTrailingComma: UnexpectedNodesSyntax?

var unexpectedBetweenArgumentTypeAndTrailingComma: UnexpectedNodesSyntax? Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Argument

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • GenericArgumentSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • GenericParameterListSyntax

Structure

GenericParameterListSyntax

struct GenericParameterListSyntax

SyntaxCollections.swift

Children

GenericParameterSyntax *

Contained in

  • GenericParameterClauseSyntax. parameters

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • GenericParameterListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • GenericParameterSyntax

Structure

GenericParameterSyntax

struct GenericParameterSyntax

SyntaxNodesGHI.swift

Children

  • attributes: AttributeListSyntax

  • specifier: ( each | let)?

  • colon: :?

  • inheritedType: TypeSyntax?

  • trailingComma: ,?

Contained in

  • GenericParameterListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, eachKeyword: TokenSyntax?, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, colon: TokenSyntax?, UnexpectedNodesSyntax?, inheritedType: (some TypeSyntaxProtocol)?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, attributes: AttributeListSyntax, UnexpectedNodesSyntax?, specifier: TokenSyntax?, UnexpectedNodesSyntax?, name: TokenSyntax, UnexpectedNodesSyntax?, colon: TokenSyntax?, UnexpectedNodesSyntax?, inheritedType: (some TypeSyntaxProtocol)?, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var attributes: AttributeListSyntax

var colon: TokenSyntax?

var eachKeyword: TokenSyntax? Deprecated

var inheritedType: TypeSyntax?

var name: TokenSyntax

var specifier: TokenSyntax?

var trailingComma: TokenSyntax?

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeAttributes: UnexpectedNodesSyntax?

var unexpectedBetweenAttributesAndEachKeyword: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenAttributesAndSpecifier: UnexpectedNodesSyntax?

var unexpectedBetweenColonAndInheritedType: UnexpectedNodesSyntax?

var unexpectedBetweenEachKeywordAndName: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenInheritedTypeAndTrailingComma: UnexpectedNodesSyntax?

var unexpectedBetweenNameAndColon: UnexpectedNodesSyntax?

var unexpectedBetweenSpecifierAndName: UnexpectedNodesSyntax?

Instance Methods

Adds the provided element to the node’s attributes collection.

Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithAttributesSyntax
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • GenericParameterSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • GenericRequirementListSyntax

Structure

GenericRequirementListSyntax

struct GenericRequirementListSyntax

SyntaxCollections.swift

Children

GenericRequirementSyntax *

Contained in

  • GenericWhereClauseSyntax. requirements

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • GenericRequirementListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • GenericRequirementSyntax

Structure

GenericRequirementSyntax

struct GenericRequirementSyntax

SyntaxNodesGHI.swift

Children

  • requirement: ( SameTypeRequirementSyntax | ConformanceRequirementSyntax | LayoutRequirementSyntax)

  • trailingComma: ,?

Contained in

  • GenericRequirementListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, body: GenericRequirementSyntax.Requirement, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?) Deprecated

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, requirement: GenericRequirementSyntax.Requirement, UnexpectedNodesSyntax?, trailingComma: TokenSyntax?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var body: GenericRequirementSyntax.Requirement Deprecated

var requirement: GenericRequirementSyntax.Requirement

var trailingComma: TokenSyntax?

var unexpectedAfterTrailingComma: UnexpectedNodesSyntax?

var unexpectedBeforeBody: UnexpectedNodesSyntax? Deprecated

var unexpectedBeforeRequirement: UnexpectedNodesSyntax?

var unexpectedBetweenBodyAndTrailingComma: UnexpectedNodesSyntax? Deprecated

var unexpectedBetweenRequirementAndTrailingComma: UnexpectedNodesSyntax?

Type Aliases

typealias Body Deprecated

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Requirement

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol
  • WithTrailingCommaSyntax

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • GenericRequirementSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • IfConfigClauseListSyntax

Structure

IfConfigClauseListSyntax

struct IfConfigClauseListSyntax

SyntaxCollections.swift

Children

IfConfigClauseSyntax *

Contained in

  • IfConfigDeclSyntax. clauses

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • IfConfigClauseListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • IfConfigClauseSyntax

Structure

IfConfigClauseSyntax

struct IfConfigClauseSyntax

SyntaxNodesGHI.swift

Children

  • poundKeyword: ( #if | #elseif | #else)

  • condition: ExprSyntax?

  • elements: ( CodeBlockItemListSyntax | SwitchCaseListSyntax | MemberBlockItemListSyntax | ExprSyntax | AttributeListSyntax)?

Contained in

  • IfConfigClauseListSyntax

Topics

Initializers

init?(some SyntaxProtocol)

init(leadingTrivia: Trivia?, UnexpectedNodesSyntax?, poundKeyword: TokenSyntax, UnexpectedNodesSyntax?, condition: (some ExprSyntaxProtocol)?, UnexpectedNodesSyntax?, elements: IfConfigClauseSyntax.Elements?, UnexpectedNodesSyntax?, trailingTrivia: Trivia?)

Instance Properties

var condition: ExprSyntax?

var elements: IfConfigClauseSyntax.Elements?

var poundKeyword: TokenSyntax

var unexpectedAfterElements: UnexpectedNodesSyntax?

var unexpectedBeforePoundKeyword: UnexpectedNodesSyntax?

var unexpectedBetweenConditionAndElements: UnexpectedNodesSyntax?

var unexpectedBetweenPoundKeywordAndCondition: UnexpectedNodesSyntax?

Type Properties

static let structure: SyntaxNodeStructure

Enumerations

enum Elements

Relationships

Conforms To

  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.TextOutputStreamable
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • IfConfigClauseSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


  • SwiftSyntax
  • ImportPathComponentListSyntax

Structure

ImportPathComponentListSyntax

struct ImportPathComponentListSyntax

SyntaxCollections.swift

Children

ImportPathComponentSyntax *

Contained in

  • ImportDeclSyntax. path

Topics

Initializers

init?(some SyntaxProtocol)

Type Aliases

typealias Element

Type Properties

static let syntaxKind: SyntaxKind

Relationships

Conforms To

  • Swift.BidirectionalCollection
  • Swift.Collection
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.Hashable
  • Swift.Sendable
  • Swift.Sequence
  • Swift.TextOutputStreamable
  • SyntaxCollection
  • SyntaxHashable
  • SyntaxProtocol

See Also

Collections

struct SyntaxChildren

Collection that contains the present child Syntax nodes of the given node.

struct SyntaxChildrenIndex

An index in a syntax children collection.

struct AccessorDeclListSyntax

struct ArrayElementListSyntax

struct ArrayElementSyntax

An element inside an array literal.

struct AttributeListSyntax

A list of attributes that can be attached to a declaration.

struct AttributeSyntax

An @ attribute.

struct AvailabilityArgumentListSyntax

struct AvailabilityArgumentSyntax

A single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".

struct CatchClauseListSyntax

struct CatchClauseSyntax

struct CatchItemListSyntax

struct CatchItemSyntax

struct ClosureCaptureListSyntax

struct ClosureCaptureSyntax

  • ImportPathComponentListSyntax
  • Children
  • Contained in
  • Topics
  • Relationships
  • See Also

| |


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment