CatchClause
struct CatchClause
struct CatchClause
init(leadingTrivia: Trivia, CatchItemList, bodyBuilder: () -> ExpressibleAsCodeBlockItemList)
A convenience initializer that calculates spacing around the catch
keyword.
init(leadingTrivia: Trivia, garbageBeforeCatchKeyword: ExpressibleAsGarbageNodes?, catchKeyword: TokenSyntax, garbageBetweenCatchKeywordAndCatchItems: ExpressibleAsGarbageNodes?, catchItems: ExpressibleAsCatchItemList?, garbageBetweenCatchItemsAndBody: ExpressibleAsGarbageNodes?, body: ExpressibleAsCodeBlock)
Creates a CatchClause
using the provided parameters.
init(leadingTrivia: Trivia, garbageBeforeCatchKeyword: ExpressibleAsGarbageNodes?, catchKeyword: TokenSyntax, garbageBetweenCatchKeywordAndCatchItems: ExpressibleAsGarbageNodes?, catchItems: ExpressibleAsCatchItemList?, garbageBetweenCatchItemsAndBody: ExpressibleAsGarbageNodes?, bodyBuilder: () -> ExpressibleAsCodeBlockItemList)
A convenience initializer that allows:
func buildSyntax(format: Format, leadingTrivia: Trivia?) -> Syntax
Conformance to SyntaxBuildable
.
func buildSyntaxList(format: Format, leadingTrivia: Trivia?) -> [Syntax]
Builds list of Syntax
s.
func createAttributeList() -> AttributeList
Conformance to ExpressibleAsAttributeList
func createCatchClause() -> CatchClause
Conformance to ExpressibleAsCatchClause
.
func createCatchClauseList() -> CatchClauseList
Conformance to ExpressibleAsCatchClauseList
func createGarbageNodes() -> GarbageNodes
Conformance to ExpressibleAsGarbageNodes
func createPrecedenceGroupAttributeList() -> PrecedenceGroupAttributeList
Conformance to ExpressibleAsPrecedenceGroupAttributeList
func createSpecializeAttributeSpecList() -> SpecializeAttributeSpecList
Conformance to ExpressibleAsSpecializeAttributeSpecList
func createStringLiteralSegments() -> StringLiteralSegments
Conformance to ExpressibleAsStringLiteralSegments
func createSwitchCaseList() -> SwitchCaseList
Conformance to ExpressibleAsSwitchCaseList
func createSyntaxBuildable() -> SyntaxBuildable
CatchClause
might conform to ExpressibleAsSyntaxBuildable
via different ExpressibleAs*
paths. Thus, there are multiple default implementations for createSyntaxBuildable
, some of which perform conversions through ExpressibleAs*
protocols. To resolve the ambiguity, provide a fixed implementation that doesn’t perform any conversions.