DeclGroupSyntax
SyntaxTraits.swift:64protocol DeclGroupSyntax : DeclSyntaxProtocol
Browse conforming typesprotocol DeclGroupSyntax : DeclSyntaxProtocol
import SwiftSyntax
A library for working with Swift code.
protocol DeclSyntaxProtocol : SyntaxProtocol
Protocol to which all DeclSyntax
nodes conform.
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 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 TextOutputStreamable
A source of text-streaming operations.
var attributes: AttributeListSyntax { get set }
var genericWhereClause: GenericWhereClauseSyntax? { get set }
A where
clause that places additional constraints on generic parameters like where Element: Hashable
.
var inheritanceClause: InheritanceClauseSyntax? { get set }
var introducer: TokenSyntax { get set }
The token that introduces this declaration, eg. class
for a class declaration.
var memberBlock: MemberBlockSyntax { get set }
var modifiers: DeclModifierListSyntax { get set }
protocol BracedSyntax : SyntaxProtocol
/ Automatically generated by generate-swift-syntax / Do not edit directly!
protocol EffectSpecifiersSyntax : SyntaxProtocol
protocol FreestandingMacroExpansionSyntax : SyntaxProtocol
protocol NamedDeclSyntax : SyntaxProtocol
protocol MissingNodeSyntax : SyntaxProtocol
Represents a layout node that is missing in the source file.
protocol ParenthesizedSyntax : SyntaxProtocol
protocol WithAttributesSyntax : SyntaxProtocol
protocol WithCodeBlockSyntax : SyntaxProtocol
protocol WithGenericParametersSyntax : SyntaxProtocol
Syntax nodes that have generic parameters.
protocol WithModifiersSyntax : SyntaxProtocol
protocol WithOptionalCodeBlockSyntax : SyntaxProtocol
protocol WithStatementsSyntax : SyntaxProtocol
protocol WithTrailingCommaSyntax : SyntaxProtocol
func with<T>(_ keyPath: WritableKeyPath<DeclGroupSyntax, T>, _ newChild: T) -> DeclGroupSyntax
Without this function, the with
function defined on SyntaxProtocol
does not work on existentials of this protocol type.
var members: MemberDeclBlockSyntax { get set }