SwitchCaseSyntax
SyntaxNodesQRS.swift:3888struct SwitchCaseSyntaxChildren
- attribute:- AttributeSyntax?
- label: (- SwitchDefaultLabelSyntax|- SwitchCaseLabelSyntax)
- statements:- CodeBlockItemListSyntax
struct SwitchCaseSyntaxattribute: AttributeSyntax?
label: (SwitchDefaultLabelSyntax | SwitchCaseLabelSyntax)
statements: CodeBlockItemListSyntax
import SwiftSyntaxA library for working with Swift code.
struct AttributeSyntaxAn @ attribute.
struct SwitchDefaultLabelSyntaxstruct SwitchCaseLabelSyntaxstruct CodeBlockItemListSyntaxstruct SwitchCaseListSyntaxstruct SyntaxChildrenCollection that contains the present child Syntax nodes of the given node.
struct SyntaxChildrenIndexAn index in a syntax children collection.
struct AccessorDeclListSyntaxstruct ArrayElementListSyntaxstruct ArrayElementSyntaxAn element inside an array literal.
struct AttributeListSyntaxA list of attributes that can be attached to a declaration.
struct AvailabilityArgumentListSyntaxstruct AvailabilityArgumentSyntaxA single argument to an @available argument like *, iOS 10.1, or message: "This has been deprecated".
struct CatchClauseListSyntaxstruct CatchClauseSyntaxstruct CatchItemListSyntaxstruct CatchItemSyntaxstruct ClosureCaptureListSyntaxstruct ClosureCaptureSyntaxstruct ClosureParameterListSyntaxstruct ClosureParameterSyntaxstruct ClosureShorthandParameterListSyntaxA list of closure parameters that are not parenthesized and don’t have type annotations.
struct ClosureShorthandParameterSyntaxstruct CodeBlockItemSyntaxA CodeBlockItem is any Syntax node that appears on its own line inside a CodeBlock.
struct CompositionTypeElementListSyntaxstruct CompositionTypeElementSyntaxstruct ConditionElementListSyntaxstruct ConditionElementSyntaxstruct DeclModifierListSyntaxstruct DeclModifierSyntaxstruct DeclNameArgumentListSyntaxstruct DeclNameArgumentSyntaxstruct DesignatedTypeListSyntaxstruct DesignatedTypeSyntaxstruct DictionaryElementListSyntaxstruct DictionaryElementSyntaxAn element inside a dictionary literal.
struct DifferentiabilityArgumentListSyntaxstruct DifferentiabilityArgumentSyntaxA differentiability argument: either the “self” identifier, a function parameter name, or a function parameter index.
struct DocumentationAttributeArgumentListSyntaxThe arguments of the ‘@_documentation’ attribute
struct DocumentationAttributeArgumentSyntaxstruct EffectsAttributeArgumentListSyntaxThe arguments of the ‘@_effects’ attribute. These will be parsed during the SIL stage.
struct EnumCaseElementListSyntaxA collection of 0 or more EnumCaseElementSyntaxs.
struct EnumCaseElementSyntaxAn element of an enum case, containing the name of the case and, optionally, either associated values or an assignment to a raw value.
struct EnumCaseParameterListSyntaxstruct EnumCaseParameterSyntaxstruct ExprListSyntaxA list of expressions connected by operators. This list is contained by a SequenceExprSyntax.
struct FunctionParameterListSyntaxA list of function parameters that are type annotated and a label. The function parameters are represented by FunctionParameterListSyntax.
struct FunctionParameterSyntaxA function parameter
struct GenericArgumentListSyntaxstruct GenericArgumentSyntaxstruct GenericParameterListSyntaxstruct GenericParameterSyntaxstruct GenericRequirementListSyntaxstruct GenericRequirementSyntaxstruct IfConfigClauseListSyntaxstruct IfConfigClauseSyntaxstruct ImportPathComponentListSyntaxstruct ImportPathComponentSyntaxstruct InheritedTypeListSyntaxstruct InheritedTypeSyntaxstruct KeyPathComponentListSyntaxThe components of a key path
struct KeyPathComponentSyntaxA single key path component
struct LabeledExprListSyntaxstruct LabeledExprSyntaxAn expression that is prefixed by a label.
struct MemberBlockItemListSyntaxstruct MemberBlockItemSyntaxA member declaration of a type consisting of a declaration and an optional semicolon;
struct MultipleTrailingClosureElementListSyntaxstruct MultipleTrailingClosureElementSyntaxstruct ObjCSelectorPieceListSyntaxstruct ObjCSelectorPieceSyntaxA 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 PatternBindingListSyntaxstruct PatternBindingSyntaxDefines variables inside a variable declaration.
struct PlatformVersionItemListSyntaxstruct PlatformVersionItemSyntaxA single platform/version pair in an attribute, e.g. iOS 10.1.
struct PrecedenceGroupAttributeListSyntaxstruct PrecedenceGroupRelationSyntaxSpecify the new precedence group’s relation to existing precedence groups.
struct PrecedenceGroupAssignmentSyntaxSpecifies the precedence of an operator when used in an operation that includes optional chaining.
struct PrecedenceGroupAssociativitySyntaxSpecifies how a sequence of operators with the same precedence level are grouped together in the absence of grouping parentheses.
struct PrecedenceGroupNameListSyntaxstruct PrecedenceGroupNameSyntaxstruct PrimaryAssociatedTypeListSyntaxstruct PrimaryAssociatedTypeSyntaxstruct SimpleStringLiteralSegmentListSyntaxString literal segments that only can contain non string interpolated or extended escaped strings
struct StringSegmentSyntaxA literal segment inside a string segment.
struct SpecializeAttributeArgumentListSyntaxA collection of arguments for the @_specialize attribute
struct LabeledSpecializeArgumentSyntaxA labeled argument for the @_specialize attribute like exported: true
struct SpecializeAvailabilityArgumentSyntaxThe availability argument for the _specialize attribute
struct SpecializeTargetFunctionArgumentSyntaxA labeled argument for the @_specialize attribute with a function decl value like target: myFunc(_:)
struct GenericWhereClauseSyntaxA where clause that places additional constraints on generic parameters like where Element: Hashable.
struct StringLiteralSegmentListSyntaxstruct ExpressionSegmentSyntaxAn interpolated expression inside a string literal.
struct SwitchCaseItemListSyntaxstruct SwitchCaseItemSyntaxstruct TuplePatternElementListSyntaxA list of TuplePatternElementSyntax.
struct TuplePatternElementSyntaxAn element that represents a single tuple value in TuplePatternElementListSyntax.
struct TupleTypeElementListSyntaxstruct TupleTypeElementSyntaxstruct TypeSpecifierListSyntaxstruct SimpleTypeSpecifierSyntaxA specifier that can be attached to a type to eg. mark a parameter as inout or consuming
struct UnexpectedNodesSyntaxA collection of syntax nodes that occurred in the source code but could not be used to form a valid syntax tree.
struct VersionComponentListSyntaxstruct VersionComponentSyntaxAn element to represent a single component in a version, like .1.
struct YieldedExpressionListSyntaxstruct YieldedExpressionSyntaxprotocol CopyableA type whose values can be implicitly or explicitly copied.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol CustomReflectableA type that explicitly supplies its own mirror.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol EquatableA type that can be compared for value equality.
protocol Escapableprotocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
protocol SyntaxHashable : HashableProtocol that provides a common Hashable implementation for all syntax nodes
protocol SyntaxProtocol : CustomDebugStringConvertible, CustomReflectable, CustomStringConvertible, Sendable, TextOutputStreamableProvide common functionality for specialized syntax nodes. Extend this protocol to provide common functionality for all syntax nodes.
protocol TextOutputStreamableA source of text-streaming operations.
protocol WithStatementsSyntax : SyntaxProtocolprotocol _LeafSyntaxNodeProtocol : SyntaxProtocolProtocol that syntax nodes conform to if they don’t have any semantic subtypes. These are syntax nodes that are not considered base nodes for other syntax types.
init?(_ node: some SyntaxProtocol) init(leadingTrivia: Trivia? = nil, _ unexpectedBeforeAttribute: UnexpectedNodesSyntax? = nil, attribute: AttributeSyntax? = nil, _ unexpectedBetweenAttributeAndLabel: UnexpectedNodesSyntax? = nil, label: SwitchCaseSyntax.Label, _ unexpectedBetweenLabelAndStatements: UnexpectedNodesSyntax? = nil, statements: CodeBlockItemListSyntax, _ unexpectedAfterStatements: UnexpectedNodesSyntax? = nil, trailingTrivia: Trivia? = nil) static let structure: SyntaxNodeStructurelet _syntaxNode: Syntaxvar attribute: AttributeSyntax? { get set }The @unknown attribute of a default label, if present.
var label: SwitchCaseSyntax.Label { get set }var statements: CodeBlockItemListSyntax { get set }var unexpectedAfterStatements: UnexpectedNodesSyntax? { get set }var unexpectedBeforeAttribute: UnexpectedNodesSyntax? { get set }var unexpectedBetweenAttributeAndLabel: UnexpectedNodesSyntax? { get set }var unexpectedBetweenLabelAndStatements: UnexpectedNodesSyntax? { get set }enum Labelinit(leadingTrivia: Trivia? = nil, _ unexpectedBeforeUnknownAttr: UnexpectedNodesSyntax? = nil, unknownAttr: AttributeSyntax? = nil, _ unexpectedBetweenUnknownAttrAndLabel: UnexpectedNodesSyntax? = nil, label: SwitchCaseSyntax.Label, _ unexpectedBetweenLabelAndStatements: UnexpectedNodesSyntax? = nil, statements: CodeBlockItemListSyntax, _ unexpectedAfterStatements: UnexpectedNodesSyntax? = nil, trailingTrivia: Trivia? = nil) var unexpectedBeforeUnknownAttr: UnexpectedNodesSyntax? { get set }var unexpectedBetweenUnknownAttrAndLabel: UnexpectedNodesSyntax? { get set }var unknownAttr: AttributeSyntax? { get set }func addStatement(_ element: CodeBlockItemSyntax) -> SwitchCaseSyntax Adds the provided element to the node’s statements collection.
init?<S>(_ node: S?) where S : SyntaxProtocol Initializes a new instance of the conforming type from a given specialized syntax node.
var customMirror: Mirror { get }var debugDescription: String { get }A simple description of this node (ie. its type).
var description: String { get }A source-accurate description of this node.
var detached: Self { get }Return this subtree with this node as the root, ie. detach this node from its parent.
var endPosition: AbsolutePosition { get }The end position of this node, including its trivia.
var endPositionBeforeTrailingTrivia: AbsolutePosition { get }The end position of this node’s content, before any trailing trivia.
var hasError: Bool { get }Whether the tree contained by this layout has any
var hasMaximumNestingLevelOverflow: Bool { get }var hasParent: Bool { get }Whether or not this node has a parent.
var hasSequenceExpr: Bool { get }Whether this tree contains a missing token or unexpected node.
var hasWarning: Bool { get }Whether the tree contained by this layout has any tokens with a TokenDiagnostic of severity warning.
var id: SyntaxIdentifier { get }Returns a value representing the unique identity of the node.
var keyPathInParent: AnyKeyPath? { get }var kind: SyntaxKind { get }The kind of the syntax node, e.g. if it is a functionDecl.
var leadingTrivia: Trivia { get set }The leading trivia of this syntax node.
var leadingTriviaLength: SourceLength { get }The length this node’s leading trivia takes up spelled out in source.
var parent: Syntax? { get }The parent of this syntax node, or nil if this node is the root.
var position: AbsolutePosition { get }The absolute position of the starting point of this node. If the first token is with leading trivia, the position points to the start of the leading trivia.
var positionAfterSkippingLeadingTrivia: AbsolutePosition { get }The absolute position of the starting point of this node, skipping any leading trivia attached to the first token syntax.
var range: Range<AbsolutePosition> { get }The range of this node including leading and trailing trivia.
var raw: RawSyntax { get }var root: Syntax { get }The root of the tree in which this node resides.
var syntaxNodeType: any SyntaxProtocol.Type { get }The dynamic metatype of the concrete node.
var syntaxTextBytes: [UInt8] { get }Retrieve the syntax text as an array of bytes that models the input source even in the presence of invalid UTF-8.
var totalLength: SourceLength { get }The length of this node including all of its trivia.
var trailingTrivia: Trivia { get set }The trailing trivia of this syntax node.
var trailingTriviaLength: SourceLength { get }The length this node’s trailing trivia takes up spelled out in source.
var trimmed: Self { get }A copy of this node without the leading trivia of the first token in the node and the trailing trivia of the last token in the node.
var trimmedDescription: String { get }The description of this node with leading whitespace of the first token and trailing whitespace of the last token removed.
var trimmedLength: SourceLength { get }The length this node takes up spelled out in the source, excluding its leading or trailing trivia.
var trimmedRange: Range<AbsolutePosition> { get }The range of this node excluding leading and trailing trivia.
static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
static func == (lhs: Self, rhs: Self) -> Bool func ancestorOrSelf<T>(mapping map: (Syntax) -> T?) -> T? Returns this node or the first ancestor that satisfies condition.
func `as`<S>(_ syntaxType: S.Type) -> S? where S : SyntaxProtocol Attempts to cast the current syntax node to a given specialized syntax type.
func asProtocol(_: (any MissingNodeSyntax).Type) -> (any MissingNodeSyntax)? Return the non-type erased version of this syntax node if it conforms to MissingNodeSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any ParenthesizedSyntax).Type) -> (any ParenthesizedSyntax)? Return the non-type erased version of this syntax node if it conforms to ParenthesizedSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any WithCodeBlockSyntax).Type) -> (any WithCodeBlockSyntax)? Return the non-type erased version of this syntax node if it conforms to WithCodeBlockSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any WithModifiersSyntax).Type) -> (any WithModifiersSyntax)? Return the non-type erased version of this syntax node if it conforms to WithModifiersSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any WithAttributesSyntax).Type) -> (any WithAttributesSyntax)? Return the non-type erased version of this syntax node if it conforms to WithAttributesSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any WithStatementsSyntax).Type) -> (any WithStatementsSyntax)? Return the non-type erased version of this syntax node if it conforms to WithStatementsSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any EffectSpecifiersSyntax).Type) -> (any EffectSpecifiersSyntax)? Return the non-type erased version of this syntax node if it conforms to EffectSpecifiersSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any WithTrailingCommaSyntax).Type) -> (any WithTrailingCommaSyntax)? Return the non-type erased version of this syntax node if it conforms to WithTrailingCommaSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any WithGenericParametersSyntax).Type) -> (any WithGenericParametersSyntax)? Return the non-type erased version of this syntax node if it conforms to WithGenericParametersSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any WithOptionalCodeBlockSyntax).Type) -> (any WithOptionalCodeBlockSyntax)? Return the non-type erased version of this syntax node if it conforms to WithOptionalCodeBlockSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any FreestandingMacroExpansionSyntax).Type) -> (any FreestandingMacroExpansionSyntax)? Return the non-type erased version of this syntax node if it conforms to FreestandingMacroExpansionSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any BracedSyntax).Type) -> (any BracedSyntax)? Return the non-type erased version of this syntax node if it conforms to BracedSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any DeclGroupSyntax).Type) -> (any DeclGroupSyntax)? Return the non-type erased version of this syntax node if it conforms to DeclGroupSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func asProtocol(_: (any NamedDeclSyntax).Type) -> (any NamedDeclSyntax)? Return the non-type erased version of this syntax node if it conforms to NamedDeclSyntax. Otherwise return nil. Note that this will incur an existential conversion.
func cast<S>(_ syntaxType: S.Type) -> S where S : SyntaxProtocol Force-casts the current syntax node to a given specialized syntax type.
func children(viewMode: SyntaxTreeViewMode) -> SyntaxChildren A sequence over the children of this node.
func debugDescription(includeTrivia: Bool = false, converter: SourceLocationConverter? = nil, mark: (any SyntaxProtocol)? = nil, indentString: String = "") -> String Returns a summarized dump of this node.
func endLocation(converter: SourceLocationConverter, afterTrailingTrivia: Bool = false) -> SourceLocation The ending location, in the provided file, of this Syntax node.
func firstToken(viewMode: SyntaxTreeViewMode) -> TokenSyntax? Returns the first token node that is part of this syntax node.
func hash(into hasher: inout Hasher) func `is`<S>(_ syntaxType: S.Type) -> Bool where S : SyntaxProtocol Checks if the current syntax node can be cast to a given specialized syntax type.
func isProtocol(_: (any MissingNodeSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to MissingNodeSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any ParenthesizedSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to ParenthesizedSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any WithCodeBlockSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to WithCodeBlockSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any WithModifiersSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to WithModifiersSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any WithAttributesSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to WithAttributesSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any WithStatementsSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to WithStatementsSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any EffectSpecifiersSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to EffectSpecifiersSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any WithTrailingCommaSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to WithTrailingCommaSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any WithGenericParametersSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to WithGenericParametersSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any WithOptionalCodeBlockSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to WithOptionalCodeBlockSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any FreestandingMacroExpansionSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to FreestandingMacroExpansionSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any BracedSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to BracedSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any DeclGroupSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to DeclGroupSyntax. Note that this will incur an existential conversion.
func isProtocol(_: (any NamedDeclSyntax).Type) -> Bool Check whether the non-type erased version of this syntax node conforms to NamedDeclSyntax. Note that this will incur an existential conversion.
func lastToken(viewMode: SyntaxTreeViewMode) -> TokenSyntax? Returns the last token node that is part of this syntax node.
func nextToken(viewMode: SyntaxTreeViewMode) -> TokenSyntax? Recursively walks through the tree to find the next token semantically after this node.
func node(at syntaxIdentifier: SyntaxIdentifier) -> Syntax? If the node with the given syntaxIdentifier is a (recursive) child of this node, return the node with that identifier.
func previousToken(viewMode: SyntaxTreeViewMode) -> TokenSyntax? Recursively walks through the tree to find the token semantically before this node.
func sourceRange(converter: SourceLocationConverter, afterLeadingTrivia: Bool = true, afterTrailingTrivia: Bool = false) -> SourceRange The source range, in the provided file, of this Syntax node.
func startLocation(converter: SourceLocationConverter, afterLeadingTrivia: Bool = true) -> SourceLocation The starting location, in the provided file, of this Syntax node.
func token(at position: AbsolutePosition) -> TokenSyntax? Find the syntax token at the given absolute position within this syntax node or any of its children.
func tokens(viewMode: SyntaxTreeViewMode) -> TokenSequence Sequence of tokens that are part of this Syntax node.
func trimmed(matching filter: (TriviaPiece) -> Bool) -> Self A copy of this node with pieces that match matching trimmed from the leading trivia of the first token and trailing trivia of the last token.
func trimmedDescription(matching filter: (TriviaPiece) -> Bool) -> String The description of this node with pieces that match matching removed from the leading trivia of the first token and trailing trivia of the last token.
func with<T>(_ keyPath: WritableKeyPath<any WithStatementsSyntax, T>, _ newChild: T) -> any WithStatementsSyntax Without this function, the with function defined on SyntaxProtocol does not work on existentials of this protocol type.
func with<T>(_ keyPath: WritableKeyPath<Self, T>, _ value: T) -> Self Returns a new syntax node that has the child at keyPath replaced by value.
func write<Target>(to stream: inout Target) where Target : TextOutputStream Prints the raw value of this node to the provided stream.
var byteRange: ByteSourceRange { get }var byteSize: Int { get }The textual byte length of this node including leading and trailing trivia.
var byteSizeAfterTrimmingTrivia: Int { get }The textual byte length of this node excluding leading and trailing trivia.
var contentLength: SourceLength { get }var firstToken: TokenSyntax? { get }var index: SyntaxChildrenIndex { get }The index of this node in a SyntaxChildren collection.
var isImplicit: Bool { get }When isImplicit is true, the syntax node doesn’t include any underlying tokens, e.g. an empty CodeBlockItemList.
var lastToken: TokenSyntax? { get }var nextToken: TokenSyntax? { get }var previousToken: TokenSyntax? { get }var totalByteRange: ByteSourceRange { get }The byte source range of this node including leading and trailing trivia.
var trimmedByteRange: ByteSourceRange { get }The byte source range of this node excluding leading and trailing trivia.
func `as`<S>(_ syntaxType: S.Type) -> S? where S : SyntaxProtocol Attempts to cast the current leaf syntax node to a different specified type.
func `as`(_ syntaxType: Syntax.Type) -> Syntax? Attempts to upcast the current syntax node to Syntax node.
func `as`(_ syntaxType: Self.Type) -> Self? Casts the current syntax node to its own type.
func cast<S>(_ syntaxType: S.Type) -> S where S : SyntaxProtocol Force-casts the current leaf syntax node to a different specified type.
func cast(_ syntaxType: Syntax.Type) -> Syntax Force-cast the current syntax node to Syntax node..
func cast(_ syntaxType: Self.Type) -> Self Force-casts the current syntax node to its own type.
func detach() -> Self func `is`<S>(_ syntaxType: S.Type) -> Bool where S : SyntaxProtocol Checks if the current leaf syntax node can be cast to a different specified type.
func `is`(_ syntaxType: Syntax.Type) -> Bool Checks if the current syntax node can be upcast to Syntax node.
func `is`(_ syntaxType: Self.Type) -> Bool Checks if the current syntax node can be cast to its own type.
import SwiftParserA parser for the Swift programming language.
protocol SyntaxParseable : SyntaxProtocolstatic func parse(from parser: inout Parser) -> SwitchCaseSyntax import SwiftSyntaxBuilderSwiftSyntaxBuilder is a tool for generating Swift code in a convenient way using result builders.
protocol ExpressibleByExtendedGraphemeClusterLiteral : ExpressibleByUnicodeScalarLiteralA type that can be initialized with a string literal containing a single extended grapheme cluster.
protocol ExpressibleByStringInterpolation : ExpressibleByStringLiteralA type that can be initialized by string interpolation with a string literal that includes expressions.
protocol ExpressibleByStringLiteral : ExpressibleByExtendedGraphemeClusterLiteralA type that can be initialized with a string literal.
protocol ExpressibleByUnicodeScalarLiteralA type that can be initialized with a string literal containing a single Unicode scalar value.
protocol SyntaxExpressibleByStringInterpolation : ExpressibleByStringInterpolation where Self.StringInterpolation == SyntaxStringInterpolationSyntax nodes that can be formed by a string interpolation involve source code and interpolated syntax nodes.
init(_ header: SyntaxNodeString, @CodeBlockItemListBuilder statementsBuilder: () throws -> CodeBlockItemListSyntax) rethrows Constructs a case item where header includes the text between the case keyword and the : (both inclusive) and statementsBuilder can be used to build the statements inside the case item.
init(leadingTrivia: Trivia? = nil, unexpectedBeforeAttribute: UnexpectedNodesSyntax? = nil, attribute: AttributeSyntax? = nil, unexpectedBetweenAttributeAndLabel: UnexpectedNodesSyntax? = nil, label: SwitchCaseSyntax.Label, unexpectedBetweenLabelAndStatements: UnexpectedNodesSyntax? = nil, unexpectedAfterStatements: UnexpectedNodesSyntax? = nil, @CodeBlockItemListBuilder statementsBuilder: () throws -> CodeBlockItemListSyntax, trailingTrivia: Trivia? = nil) rethrows A convenience initializer that allows initializing syntax collections using result builders
init(leadingTrivia: Trivia? = nil, unexpectedBeforeUnknownAttr: UnexpectedNodesSyntax? = nil, unknownAttr: AttributeSyntax? = nil, unexpectedBetweenUnknownAttrAndLabel: UnexpectedNodesSyntax? = nil, label: SwitchCaseSyntax.Label, unexpectedBetweenLabelAndStatements: UnexpectedNodesSyntax? = nil, unexpectedAfterStatements: UnexpectedNodesSyntax? = nil, @CodeBlockItemListBuilder statementsBuilder: () throws -> CodeBlockItemListSyntax, trailingTrivia: Trivia? = nil) rethrows init(extendedGraphemeClusterLiteral value: Self.StringLiteralType) init(stringLiteral value: String) init(unicodeScalarLiteral value: Self.ExtendedGraphemeClusterLiteralType) import SwiftLexicalLookupprotocol ScopeSyntax : SyntaxProtocolvar defaultIntroducedNames: [LookupName] { get }Names introduced within case items as well as sequential names from inside this case.
var scopeDebugName: String { get }func lookup(_ identifier: Identifier?, at lookUpPosition: AbsolutePosition, with config: LookupConfig) -> [LookupResult] Returns results with names matching lookup. Includes names introduced in it’s label and sequentially introduced names from inside this case.
var parentScope: (any ScopeSyntax)? { get }var scopeDebugDescription: String { get }Debug description of this scope.
var scopeDebugHierarchyDescription: String { get }Hierarchy of scopes starting from this scope.