Enumerationswift-syntax 600.0.1SwiftSyntax
Item
RawSyntaxNodesC.swift:1699This declaration is gated by at least one @_spi attribute.
enum Item
This declaration is gated by at least one @_spi attribute.
enum Item
import SwiftSyntax
A library for working with Swift code.
struct RawCodeBlockItemSyntax
case decl(RawDeclSyntax)
case stmt(RawStmtSyntax)
case expr(RawExprSyntax)
init?(_ other: some RawSyntaxNodeProtocol)
init(_ unexpectedBeforeItem: RawUnexpectedNodesSyntax? = nil, item: Item, _ unexpectedBetweenItemAndSemicolon: RawUnexpectedNodesSyntax? = nil, semicolon: RawTokenSyntax?, _ unexpectedAfterSemicolon: RawUnexpectedNodesSyntax? = nil, arena: SyntaxArena)
static func isKindOf(_ raw: RawSyntax) -> Bool
var item: RawSyntax { get }
var layoutView: RawSyntaxLayoutView { get }
var raw: RawSyntax
var semicolon: RawTokenSyntax? { get }
var unexpectedAfterSemicolon: RawUnexpectedNodesSyntax? { get }
var unexpectedBeforeItem: RawUnexpectedNodesSyntax? { get }
var unexpectedBetweenItemAndSemicolon: RawUnexpectedNodesSyntax? { get }
protocol CustomStringConvertible
A type with a customized textual representation.
protocol RawSyntaxNodeProtocol : CustomStringConvertible, Sendable, TextOutputStreamable
All typed raw syntax nodes conform to this protocol. RawXXXSyntax
is a typed wrappeer of RawSyntax
.
protocol Sendable
protocol TextOutputStreamable
A source of text-streaming operations.
init?(_ other: some RawSyntaxNodeProtocol)
static func isKindOf(_ raw: RawSyntax) -> Bool
var raw: RawSyntax { get }
var description: String { get }
var hasError: Bool { get }
Whether the tree contained by this layout has any
var isEmpty: Bool { get }
func `as`<Node>(_: Node.Type) -> Node? where Node : RawSyntaxNodeProtocol
Cast to the specified raw syntax type if possible.
func cast<S>(_ syntaxType: S.Type) -> S where S : RawSyntaxNodeProtocol
func `is`<Node>(_: Node.Type) -> Bool where Node : RawSyntaxNodeProtocol
Check if this instance can be cast to the specified syntax type.
func write(to target: inout some TextOutputStream)