SyntaxChildChoices
Protocol for the enums nested inside Syntax
nodes that enumerate all the possible types a child node might have.
protocol SyntaxChildChoices : SyntaxProtocol
Browse conforming typesProtocol for the enums nested inside Syntax
nodes that enumerate all the possible types a child node might have.
protocol SyntaxChildChoices : SyntaxProtocol
import SwiftSyntax
A library for working with Swift code.
struct 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.
protocol SyntaxProtocol : CustomDebugStringConvertible, CustomReflectable, CustomStringConvertible, Sendable, TextOutputStreamable
Provide common functionality for specialized syntax nodes. Extend this protocol to provide common functionality for all syntax nodes.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomReflectable
A type that explicitly supplies its own mirror.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Sendable
protocol TextOutputStreamable
A source of text-streaming operations.
func `as`<S>(_ syntaxType: S.Type) -> S? where S : SyntaxProtocol
Attempts to cast the current SyntaxChildChoices
instance to a given specialized syntax type.
func cast<S>(_ syntaxType: S.Type) -> S where S : SyntaxProtocol
Force-casts the current SyntaxChildChoices
instance to a given specialized syntax type.
func `is`<S>(_ syntaxType: S.Type) -> Bool where S : SyntaxProtocol
Checks if the current SyntaxChildChoices
instance can be cast to a given specialized syntax type.