var customMirror: Mirrorvar debugDescription: StringA simple description of this node (ie. its type).
var description: StringA source-accurate description of this node.
var detached: SelfReturn this subtree with this node as the root, ie. detach this node from its parent.
var endPosition: AbsolutePositionThe end position of this node, including its trivia.
var endPositionBeforeTrailingTrivia: AbsolutePositionThe end position of this node’s content, before any trailing trivia.
var hasError: BoolWhether the tree contained by this layout has any
var hasMaximumNestingLevelOverflow: Boolvar hasParent: BoolWhether or not this node has a parent.
var hasSequenceExpr: BoolWhether this tree contains a missing token or unexpected node.
var hasWarning: BoolWhether the tree contained by this layout has any tokens with a TokenDiagnostic of severity warning.
var id: SyntaxIdentifierReturns a value representing the unique identity of the node.
var keyPathInParent: AnyKeyPath?var kind: SyntaxKindThe kind of the syntax node, e.g. if it is a functionDecl.
var leadingTrivia: TriviaThe leading trivia of this syntax node.
var leadingTriviaLength: SourceLengthThe length this node’s leading trivia takes up spelled out in source.
var parent: Syntax?The parent of this syntax node, or nil if this node is the root.
var position: AbsolutePositionThe 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: AbsolutePositionThe absolute position of the starting point of this node, skipping any leading trivia attached to the first token syntax.
var range: Range<AbsolutePosition>The range of this node including leading and trailing trivia.
var root: SyntaxThe root of the tree in which this node resides.
var syntaxNodeType: any SyntaxProtocol.TypeThe dynamic metatype of the concrete node.
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.
var totalLength: SourceLengthThe length of this node including all of its trivia.
var trailingTrivia: TriviaThe trailing trivia of this syntax node.
var trailingTriviaLength: SourceLengthThe length this node’s trailing trivia takes up spelled out in source.
var trimmed: SelfA 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: StringThe description of this node with leading whitespace of the first token and trailing whitespace of the last token removed.
var trimmedLength: SourceLengthThe length this node takes up spelled out in the source, excluding its leading or trailing trivia.
var trimmedRange: Range<AbsolutePosition>The range of this node excluding leading and trailing trivia.
func ancestorOrSelf<T>(mapping: (Syntax) -> T?) -> T?Returns this node or the first ancestor that satisfies condition.
func `as`<S>(S.Type) -> S?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>(S.Type) -> SForce-casts the current syntax node to a given specialized syntax type.
func children(viewMode: SyntaxTreeViewMode) -> SyntaxChildrenA sequence over the children of this node.
func debugDescription(includeTrivia: Bool, converter: SourceLocationConverter?, mark: (any SyntaxProtocol)?, indentString: String) -> StringReturns a summarized dump of this node.
func endLocation(converter: SourceLocationConverter, afterTrailingTrivia: Bool) -> SourceLocationThe 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: inout Hasher)func `is`<S>(S.Type) -> BoolChecks if the current syntax node can be cast to a given specialized syntax type.
func isProtocol((any MissingNodeSyntax).Type) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> BoolCheck 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) -> 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, afterTrailingTrivia: Bool) -> SourceRangeThe source range, in the provided file, of this Syntax node.
func startLocation(converter: SourceLocationConverter, afterLeadingTrivia: Bool) -> SourceLocationThe starting location, in the provided file, of this Syntax node.
func token(at: AbsolutePosition) -> TokenSyntax?Find the syntax token at the given absolute position within this syntax node or any of its children.
func tokens(viewMode: SyntaxTreeViewMode) -> TokenSequenceSequence of tokens that are part of this Syntax node.
func trimmed(matching: (TriviaPiece) -> Bool) -> SelfA 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: (TriviaPiece) -> Bool) -> StringThe 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>(WritableKeyPath<any WithTrailingCommaSyntax, T>, T) -> any WithTrailingCommaSyntaxWithout this function, the with function defined on SyntaxProtocol does not work on existentials of this protocol type.
func with<T>(WritableKeyPath<Self, T>, T) -> SelfReturns a new syntax node that has the child at keyPath replaced by value.
func write<Target>(to: inout Target)Prints the raw value of this node to the provided stream.